Created
March 3, 2020 10:36
-
-
Save harry-wood/d77d5a5317587ea99799de8076befe0f to your computer and use it in GitHub Desktop.
ActionMailer test
This file contains hidden or 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
class TestMailer < ActionMailer::Base | |
default from: "[email protected]" | |
def test_mail | |
mail( | |
to: "Harry Wood <[email protected]>", | |
subject: "Testing mail sending", | |
from: "[email protected]", | |
content_type: "text/html", | |
) do |format| | |
format.text do | |
render :text => 'Test body text' | |
end | |
end | |
end | |
end | |
TestMailer.test_mail.deliver |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment