I am trying to build a contact form in Rails 4, where the form takes a name, email, and body and sends it to my email address. Upon clicking \"Submit\", the app redirects ba
It turned out that I hadn't configured my Heroku app with an external SMTP service (since I have never done anything with email before, I didn't know to do this). Since I'm relatively familiar with MailChimp, and especially since their Mandrill service has a free tier (I am building this app for a student organization), I easily added Mandrill to my Heroku app and included the following settings in application.rb:
ActionMailer::Base.smtp_settings = {
address: 'smtp.mandrillapp.com',
port: 587,
user_name: ENV['MANDRILL_USERNAME'],
password: ENV['MANDRILL_APIKEY']
}
Where the ENV vars were set automatically by the add-on.