I use the Mime Mail module, and Rules. I create a Rules action "Send HTML e-mail" and pointing in the "attachments" path to the generated pdf (eg /invoice/pdf/1). But the mail comes only a blank message. What am I doing wrong?
I use the Mime Mail module, and Rules. I create a Rules action "Send HTML e-mail" and pointing in the "attachments" path to the generated pdf (eg /invoice/pdf/1). But the mail comes only a blank message. What am I doing wrong?
Comments
Comment #1
maico de jongI guess the problem is Mime Mail can't send a PDF dynamically generated by this module when visiting the views url.
I managed to send a PDF invoice by mail by first saving the PDF to the private file directory.
So in rules you have to setup two actions:
- Save PDF as file on server (To {private_location}/[commerce-order:order-id]) where private location is the location set in file system.
- Mail with attachment{private_location}/[commerce-order:order-id].pdf
Comment #2
simon georges commented