Project

General

Profile

Configure smtp server in configuration.yml

Added by Askar K over 8 years ago

Hello all,

I'm trying to setup smtp server in redmine 3.1.

In settings, it says I'll have to setup smtp server in config/configuration.yml. (link#1)

There's also a doc http://www.redmine.org/projects/redmine/wiki/EmailConfiguration about it, while it also mentions I need to refer to http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration (link#2)

If I follow the two links above, that would mean I will need to setup smtp servers in two files, but I guess this is not correct.

Can you please point out the correct doc on setting up an smtp server?

I've tried only by specifying in the config/configuration.yml as follows:

default:
email_delivery:
delivery_method: :async_smtp
async_smtp_settings:
address: smtp.mandrillapp.com
post: 587
authentication: :login
domain: mandrillapp.com
user_name: my_username
password: my_password

and I'm having the following errors when I try to run rails server: Please see the link https://gist.github.com/tenzan/dc0c446cf299a81b1cf5

Thanks.


Replies (5)

RE: Configure smtp server in configuration.yml - Added by Deoren Moor over 8 years ago

Our configuration is super simple and uses the local SMTP server on the same box to receive email, so our example wouldn't be of much help.

Looking at the configuration.yml file I see several examples there which appear similar to yours, but many of the values are quoted. I'm not familiar enough with YML conf files to note whether quotes are required or if whitespace matters, but I tend to assume it is.

Here is the example that I see in the file which may apply to your situation:

production:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      tls: true
      address: "smtp.gmail.com" 
      port: 587
      domain: "smtp.gmail.com" # 'your.domain.com' for GoogleApps
      authentication: :plain
      user_name: "your_email@gmail.com" 
      password: "your_password" 

RE: Configure smtp server in configuration.yml - Added by Deoren Moor over 8 years ago

You're welcome, did you figure it out?

RE: Configure smtp server in configuration.yml - Added by Askar K over 8 years ago

I was experimenting in DigitalOcean's droplet. I shut down that droplet.

I think it started working when I changed delivery_method: from :async_smtp to :smtp

RE: Configure smtp server in configuration.yml - Added by Deoren Moor over 8 years ago

Glad to hear it, and thanks for noting the specific fix.

    (1-5/5)