Content
Cannot send test email SMTP
Added by Robert Alers over 4 years ago
Hoping anyone can help me with this.
I run openproject in a docker container on unraid.
When trying to connect my sendgrid account to OpenProject (free edition) i get the following error:
"An error occurred while sending mail (Cannot assign requested address - connect(2) for "localhost" port 587)"
The log says the following:
App 427 output: method=POST path=/admin/test_email format=html controller=AdminController action=test_email status=302 duration=42.77 view=0.00 db=2.86 location=https://MYDOMAIN/admin/mail_notifications user=2
App 427 output: method=GET path=/admin/mail_notifications format=html controller=Admin::MailNotificationsController action=show status=200 duration=133.09 view=118.09 db=7.94 user=2
Any idea how to solve this?
Thanks in advance!
Replies (2)
Hello,
It seems like you haven't properly set the SMTP server hostname. Maybe you can show a screenshot of your config (removing any secrets)?
You can also launch a console with
docker-compose run web bundle exec rails c
and then enterActionMailer::Base.smtp_settings
to view the configuration.