Problems configuring smtp server
Hi, I managed to install loomio in a AWS machine using docker as a deployment tool. Nevertheless I am having trouble integrating a smtp server (currently the email services are down).
This is the configuration that I currently have in the env file:
======
SUPPORT_EMAIL=my_mail@gmail.com
SMTP_DOMAIN=gmail.com
SMTP_SERVER=smtp.gmail.com
SMTP_PORT=465
SMTP_USERNAME=my_mail@gmail.com
SMTP_PASSWORD= ***************
======
Also in the DNS zone I have a record saying:
======
MX loomio.mydomain.com, loomio.mydomain.com, priority 0
======
like the explanation in loomio_deploy github says.
When I try to recover my password in https://loomio.my_domain.com/users/password/new, I get the folllowing error retrieved from docker-compose logs:
======
loomio_1 | Sent mail to my_mail@gmail.com (10087.7ms)
loomio_1 | Completed 500 Internal Server Error in 11380ms (ActiveRecord: 36.9ms)
loomio_1 |
loomio_1 | EOFError (end of file reached):
======
Any help would be really appreciated :).
Camilo Rojas Tue 10 May 2016 1:58AM
Hi, thanks for the answer!!
At the end i configured it with sendgrid and as you said the domain had to be my own.
Hillary Chituwu Thu 22 Sep 2016 10:51AM
Hi Robert i have the same challenge with my email attached is my configuration kindly assist. if i use password reset to test, my email reaches me but if i create a group there is no email coming.
Hillary Chituwu Fri 23 Sep 2016 12:47PM
Hie Robert check my logs here can you assist in getting to understand the meaning of the failed message.
"loomio_1 | Started POST "/api/v1/membership_requests" for 41.57.124.20 at 2016-09-23 12:38:38 +0000
loomio_1 | Processing by API::MembershipRequestsController#create as JSON
loomio_1 | Parameters: {"membership_request"=>{"name"=>"Hillary Chituwu", "email"=>"hillary@zarnet.ac.zw", "introduction"=>"hie", "group_id"=>21}}
loomio_1 | Completed 200 OK in 71ms (Views: 1.8ms | ActiveRecord: 15.8ms)
nginx_1 | nginx.1 | loomio.zarnet.ac.zw 41.57.124.20 - - [23/Sep/2016:12:38:38 +0000] "POST /api/v1/membership_requests HTTP/1.1" 200 838 "https://loomio.zarnet.ac.zw/g/2NJoP6EL/eduhub" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36"
worker_1 | [Worker(host:ab3d12d6a9df pid:1)] Job Events::MembershipRequested#notify_users_without_delay! (id=221) RUNNING
worker_1 | 2016-09-23T12:38:41+0000: [Worker(host:ab3d12d6a9df pid:1)] Job Events::MembershipRequested#notify_users_without_delay! (id=221) RUNNING
worker_1 | [Worker(host:ab3d12d6a9df pid:1)] Job Events::MembershipRequested#notify_users_without_delay! (id=221) COMPLETED after 0.0172
worker_1 | 2016-09-23T12:38:41+0000: [Worker(host:ab3d12d6a9df pid:1)] Job Events::MembershipRequested#notify_users_without_delay! (id=221) COMPLETED after 0.0172
worker_1 | [Worker(host:ab3d12d6a9df pid:1)] 1 jobs processed at 33.6172 j/s, 0 failed
worker_1 | 2016-09-23T12:38:41+0000: [Worker(host:ab3d12d6a9df pid:1)] 1 jobs processed at 33.6172 j/s, 0 failed
"

Robert Guthrie Sat 24 Sep 2016 12:13AM
@hillarychituwu I can't see any error messages in the logs you've provided.
Can you please explain the problem you are having?
Hillary Chituwu Sat 24 Sep 2016 4:03AM
Thanks for responding, 1st if i add a group, i dont receive any email hence i am not able to get into that group. I would expect it to automatically add me to the group but i am seeing request to join group button. But if i request password reset, i receive the email. 2nd if i add a group, the group does not appear on left panel. 3rd my sign out button does not log me out

Robert Guthrie Sat 24 Sep 2016 4:25AM
Hi @hillarychituwu, sorry you're still having these issues.
It seems like the email is being passed to your SMTP server correctly, because of this line from your logs:
worker_1 | 2016-09-23T12:38:41+0000: [Worker(host:ab3d12d6a9df pid:1)] Job Events::MembershipRequested#notify_users_without_delay! (id=221) COMPLETED after 0.0172
So I think the problem is with delivery. One option is to try another SMTP server. Another option is to look at logs from your SMTP server. Another option is to point loomio a MailDev instance and confirm that emails arrive there.. If they do then you can be sure it's something to do with SMTP configuration rather than Loomio.
Hillary Chituwu Sat 24 Sep 2016 6:16AM
Thanks let me try what you suggested but if the password reset email is being delivered can the problem be my smtp server?
Hillary Chituwu Sun 25 Sep 2016 10:36AM
Hie Robert, i have tried different smtp server this time with logs turned on. if i create a group or request to join group, there is nothing in my email logs but if i request password reset, i can see the email, and in the logs. please assist.

Robert Guthrie Sun 25 Sep 2016 7:55PM
It seems like emails from background jobs are not sending. I cant understand why though.
I can see you have a worker to process background jobs and they seem to complete ok.
Sorry, I'm out of ideas!
Robert Guthrie · Tue 10 May 2016 1:50AM
Hi @camilorojas. Sorry about the delayed response.
I think your SMTP_DOMAIN should be your own domain name. Not gmail.com.
Is there any other error messages you can see?
You might need to use a google app password. Or try another SMTP service.