על ההגדרה של SMTP

סיכום מבוסס בינה מלאכותית

A user, zhongziqi, is having trouble sending emails in a Discourse development environment set up via Docker on WSL2, despite configuring SMTP in discourse_defaults.conf and restarting services. They are unsure if SMTP should be configured in that file and are seeing repeated [APIv1] KEEPALIVE api/v1/events messages in the console. NateDhaliwal clarifies that in a development environment, SMTP credentials may not be needed and points to the default configuration. He also notes the keepalive message is normal and suggests accessing MailHog via port 8025 to view sent emails. tobiaseigen welcomes the user and asks if the issue is resolved, recommending closing the topic if so, or seeking further help if still stuck, suggesting a VPS setup might be easier for beginners.

שימושתי ב-Windows 10’s WSL2 להתקין Docker והפעלתי את אפליקציית Discourse שלי. שיניתי את פרטי תצורת SMTP בקובץ discourse/config/discourse_defaults.conf, והרצתי מחדש את d/boot_dev -p, d/rails s, ו-d/ember-cli, אך האימייל עדיין לא נשלח. אין לי דרך לקבוע היכן הבעיה. האם עליי להגדיר את SMTP ב-discourse/config/discourse_defaults.conf? השתמשתי ב-d/mailhog לבדיקה, nhưng ה-bash פשוט חזר על עצמו ב

IIRC if you are using a development environment, you don’t need to set up an SMTP username and password.

Also:

That seems normal, since I also see that in my development environment’s console when running mailhog.

You’ll have to open port (I think) 8025 to view the mailhog page. There, you can see the emails sent.

@zhongziqi welcome to our community! :waving_hand: Did @NateDhaliwal’s post answer your question? If so you can close this topic by ticking the solutions button on his post.

If not, let us know if you’re still feeling stuck! Some people find it easier at first to just follow the official install using a VPS rather than trying to start by setting up a dev install on their local machine.