loomio / loomio-deploy

Install Loomio on your own server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SMTP Problems

andreasnuesslein opened this issue · comments

Hi all,

I've been trying for many hours now to get SMTP to work but it's just not happening for me. I tried different services as well.

One email hoster gives me
501 5.1.7 Bad sender address syntax

gmail gives me
Net::SMTPFatalError: 555 5.5.2 Syntax error. r9sm2725089wrt.78 - gsmtp

It seems like the SUPPORT_EMAIL is malformatted, no matter what I do.

I tried SUPPORT_EMAIL:="Loomio <myloomio@gmail.com>", SUPPORT_EMAIL=myloomio@gmail.com,
I tried PORT 587, PORT 465, with SSL, without SSL...

Could somebody provide a working gmail - config please? OR also: are there undocumented variables that I could fiddle with? STARTTLS for example?

much obliged 👋

Hi!

Hrrmm. I'm not sure if gmail supports sending with an unapproved sender address.
That may be the problem. However, SUPPORT_EMAIL does not affect this, that's where internal help requests get sent to.

Sender address is likely to be a problem with NOTIFICATIONS_EMAIL_ADDRESS or SMTP_DOMAIN.

If NOTIFICATIONS_EMAIL_ADDRESS is not defined then it defaults to notifications@SMTP_DOMAIN

And usually one does not set NOTIFICATIONS_EMAIL_ADDRESS, just SMTP_DOMAIN.

All the configuration options map to Rails ActionMailer settings via this code:

https://github.com/loomio/loomio/blob/master/config/application.rb#L89

Where you can see the ENV's available.

Good luck!

Ach!, NOTIFICATIONS_EMAIL_ADDRESS was the culprit. Once I set it to NOTIFICATIONS_EMAIL_ADDRESS="myloomio@gmail.com" it worked nicely with either mail providers.

Thanks @robguthrie 👍