Created
October 4, 2012 11:45
-
-
Save modsaid/3833121 to your computer and use it in GitHub Desktop.
Testing ActionMailer from Rails 3 console
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
#place this directly in the rails console of ur rails application | |
class UserMailer < ActionMailer::Base | |
default from: 'sender@espace.com.eg' | |
def test_email | |
@receiver_email = 'mahmoud.said@espace.com.eg' | |
mail(to: @receiver_email, subject: 'testing email from console') | |
end | |
end | |
UserMailer.test_email.deliver! | |
# If the configuration is correct and everything is fine, the receiver should receive the test email instantly |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment