It would be useful to enable some cases for testing of emails in web applications. For example, white list emails to http://mailtrap.io so that developers can test emails without the ability to send spam.

I am using SendGrid, but it is still trying to mail via SMTP, can anyone provide the code example / sample of how Sendgrid could be used in the development environment ? I was able to use the API, but I would like to use the ActionMailer in production (easier to manage the HTML of the messages) and I don’t want to have to use different api in development.