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

maico de jong’s picture

I 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

simon georges’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.