File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
actionmailer/lib/action_mailer Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -208,6 +208,19 @@ module ActionMailer
208208 # end
209209 # end
210210 #
211+ # You can also send attachments with html template, in this case you need to add body, attachments,
212+ # and custom content type like this:
213+ #
214+ # class NotifierMailer < ApplicationMailer
215+ # def welcome(recipient)
216+ # attachments['free_book.pdf'] = File.read('path/to/file.pdf')
217+ # mail(to: recipient,
218+ # subject: "New account information",
219+ # content_type: "text/html",
220+ # body: "<html><body>Hello there</body></html>")
221+ # end
222+ # end
223+ #
211224 # = Inline Attachments
212225 #
213226 # You can also specify that a file should be displayed inline with other HTML. This is useful
You can’t perform that action at this time.
0 commit comments