I am trying to debug how rails sends email. Currently it doesn’t work for me 🙂
But where in the configurations do I change the SMTP I am trying to send from? And how to I set it up so that on dev/stage/live it uses appropriate SMTP configurations of the server it is mailing from?
Thanks,
Alex
ps – I had originally set it up using this tutorial: http://guides.rubyonrails.org/action_mailer_basics.html
Examples are assuming that you use the mail server MAIL.YOUR-DOMAIN.COM
Action Mailer now uses the Mail gem — you probably need something like this in your ./config/environments/env.rb file:
see also: http://edgeguides.rubyonrails.org/action_mailer_basics.html
another way to do this is to put the follwoing into ./config/initializers/setup_mail.rb :
e.g. the code above works if you want to use Gmail’s SMTP server to send email via your Gmail account..
Other SMTP servers may need other values for :authentication and :enable_starttls_auto
depending on the SMTP server setup