Forked from tansengming/Rails Console Actionmailer test.rb
Created
May 12, 2016 16:51
-
-
Save jongrover/5c3a66365623b7f6b40012d2b3dc9b26 to your computer and use it in GitHub Desktop.
Rails Console Actionmailer test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copy and paste this to the rails console to test your email settings | |
class MyMailer < ActionMailer::Base | |
def test_email | |
@recipients = "[email protected]" | |
@from = "[email protected]" | |
@subject = "test from the Rails Console" | |
@body = "This is a test email" | |
end | |
end | |
MyMailer::deliver_test_email | |
# if all goes well you should see a lot text scrolling by | |
# Copied with love from http://lists.radiantcms.org/pipermail/radiant/2007-February/003394.html | |
# btw for info on how to get rails working with Gmail SMTP go to http://robertbousquet.com/articles/using-gmail-smtp-with-actionmailer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment