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:
parent
36efba0520
commit
40b1f648b9
1 changed files with 13 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue