Skip to content

Instantly share code, notes, and snippets.

@harry-wood
Created March 3, 2020 10:36
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 harry-wood/d77d5a5317587ea99799de8076befe0f to your computer and use it in GitHub Desktop.
Save harry-wood/d77d5a5317587ea99799de8076befe0f to your computer and use it in GitHub Desktop.
ActionMailer test
class TestMailer < ActionMailer::Base
default from: "test@gmail.com"
def test_mail
mail(
to: "Harry Wood <test@gmail.com>",
subject: "Testing mail sending",
from: "test@gmail.com",
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