DISCOURSE_SMTP_AUTHENTICATION setting ignored

I have a self-hosted Discourse install and use socketlabs.com as my SMTP server (they have a free plan with 40000. I was unable to get emails to work no matter what authentication protocol I used.

I was able to fix the problem by modifying lib/tasks/emails.rake as follows:

Change the line:
Net::SMTP.start(smtp[:address], smtp[:port], 'localhost', smtp[:user_name], smtp[:password])
to
Net::SMTP.start(smtp[:address], smtp[:port], 'localhost', smtp[:user_name], smtp[:password], smtp[:authentication])

Without this setting, the lower level SMTP code appears to revert to the default of ‘plain’ authentication.

2 Likes

That’s just for the first month. After that it’s $40/month.

That said, it would appear (to me, anyway) that this is a legit bug. I think, though, that it affects only this rake task that is used only for testing.

2 Likes