We can take your startup from idea to revenue.   Find out more ยป


ActionMailer Troubleshooting

Ruby

It can be difficult to track down Ruby on Rails ActionMailer issues. If you are in the development environment (i.e. not production), change the following setting in your config/environments/development.rb:

config.action_mailer.raise_delivery_errors = true

This will allow you to have errors raised for catching and display (or falling into the default error-trapping routines).

If you then see the error “501 HELO hostname” when connecting to a mail server, then add an entry to your ActionMailer config to include the domain name:

ActionMailer::Base.server_settings = {
  :address => "localhost",
  :port => 10025,
  :domain => "localdomain.lab"
}

BTW, Fakemail is a great tool for testing your SMTP code without requiring valid email addresses, mailboxes, or a true MTA.

James @ June 10, 2006

Leave a comment


Feed Contact Us