Skip to content

Instantly share code, notes, and snippets.

@modsaid
Created March 9, 2016 01:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save modsaid/103f31173c30f1719ef4 to your computer and use it in GitHub Desktop.
Save modsaid/103f31173c30f1719ef4 to your computer and use it in GitHub Desktop.
Script to test action mailer configuration. to be run through the console, or rails runner
# author @modsaid
# Script to test action mailer configuration. to be run through the console, or rails runner
class MyMailer < ActionMailer::Base
default from: 'notifications@example.com'
def test_email
mail(to: "mail@exmaple.com",
subject: 'SMTP configuraiton test',
body: 'bla bla bla')
end
end
MyMailer::test_email.deliver_now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment