Created
April 29, 2016 11:49
-
-
Save dmitry/aab8fdca10049d61faad5d0323e969b4 to your computer and use it in GitHub Desktop.
Use ActionMailer config to send plain through plain Mail
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
Mail.defaults do | |
delivery_method ActionMailer::Base.delivery_method, ActionMailer::Base.smtp_settings | |
end | |
mail = Mail.deliver do | |
to 'dmitry.polushkin@gmail.com' | |
from 'Mikel Lindsaar <test@9flats.com>' | |
subject 'First multipart email sent with Mail' | |
text_part do | |
body 'This is plain text' | |
end | |
html_part do | |
content_type 'text/html; charset=UTF-8' | |
body '<h1>This is HTML</h1>' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment