2

I need to create and send via email a PDF file with Rules using Drupal 7. I need to send it as an attachment, not as a link.

I found this post, Generate PDF with Print PDF and send in email, but Views PDF MIMEMail is a D6 module.

How can I do this?

1 Answer 1

1

You should write a port to Drupal 7. The Views PDF MIMEMail module codebase is pretty lightweight (~300 LOC). Essentially, it's a

  1. .info file declaration
  2. A .module declaring a theme function
  3. Various Rules integration functions (.rules.inc).

You can figure out how to convert the .info & .module by Googling around how to convert a .info to D7 and look up how hook_theme() changed in D7. There's a comprehensive guide on porting D6 modules to D7 if needed.

As for #3, the Rules module has some internal documentation that describes how to integrate Rules in D7. There's likely a few structural changes you'll need to do, but essentially most PHP code should stay the same.

1
  • 1
    @Pierre.Vriens: Link updated
    – Shawn Conn
    Oct 5, 2017 at 0:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.