Does ActionMailer :sendmail work in production?

Action Mailer allows you to send emails from your application using mailer classes and views. Mailers work very similarly to controllers.

Does ActionMailer :sendmail work in production?

I have a Rails 4 app that I'm trying to deploy to production on heroku. I'm using ActionMailer :sendmail to send emails from the app. :sendmail works fine in development but the app does not seem to send out emails in production. The configuration for config/environments/development.rb is

Controlsafe::Application.configure do
  ........ 
  config.action_mailer.perform_deliveries = true
  config.action_mailer.raise_delivery_errors = true
  config.action_mailer.default_url_options = {host: 'localhost:3000'}
  config.action_mailer.default_options = {from: 'no-reply@controlsafe.com'}
  config.action_mailer.delivery_method = :sendmail
  .......
end

And for config/environments/production.rb is

Controlsafe::Application.configure do
  ........ 
  config.action_mailer.perform_deliveries = true
  config.action_mailer.raise_delivery_errors = true
  config.action_mailer.default_url_options = {host: 'controlsafe.com'}
  config.action_mailer.default_options = {from: 'no-reply@controlsafe.com'}
  config.action_mailer.delivery_method = :sendmail
  .......
end

I'm not sure why the app is not sending out emails when it does fine in production. Does :sendmail even work in production? Or do I have to go with SMTP?

It would be awesome if anyone can provide some insight!


Click Here to Visit

What's Your Reaction?

like
0
dislike
0
love
0
funny
0
angry
0
sad
0
wow
0