1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Add document in mailer

This commit is contained in:
MQuy 2016-12-06 10:13:54 +08:00
parent 36efba0520
commit 40b1f648b9

View file

@ -208,6 +208,19 @@ module ActionMailer
# end
# end
#
# You can also send attachments with html template, in this case you need to add body, attachments,
# and custom content type like this:
#
# class NotifierMailer < ApplicationMailer
# def welcome(recipient)
# attachments['free_book.pdf'] = File.read('path/to/file.pdf')
# mail(to: recipient,
# subject: "New account information",
# content_type: "text/html",
# body: "<html><body>Hello there</body></html>")
# end
# end
#
# = Inline Attachments
#
# You can also specify that a file should be displayed inline with other HTML. This is useful