简体   繁体   中英

How to configure SMTP for exim in linux for Rails4 application?

We have Rails4 application. We want to use SMTP via exim.

How to configure SMTP for exim in linux for Rails4 application?

config.action_mailer.delivery_method = :exim

will this work?

Thanks

Debian 8 + Rails4.2.6 + Exim version 4.84_2

I added to my config/enviroments/production.rb file:

config.action_mailer.default_options     = { from: 'mybox@hostname.com' }
config.action_mailer.default_url_options = { host: 'hostname.com' }
config.action_mailer.perform_deliveries    = true
config.action_mailer.raise_delivery_errors = true

and clear(commented) from delivery_method and sendmail_settings params:

# config.action_mailer.delivery_method = :sendmail
# config.action_mailer.sendmail_settings = {
#     :location => '/usr/sbin/exim4',
#     :arguments => '-i'
# }

And it's work!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM