This project is not covered by Drupal’s security advisory policy.

Extends the great "Commerce Billy" with mailing capabilities via Rules:

  • Send out PDF invoices via email on creation (example)
  • Send a copy to a predefined Shop email address
  • ... and anything else possible via commerce billy pdf and Rules!

Installation and configuration

  1. Use the usual Drupal Module installation procedure.
  2. Afterwards configure your module at: admin/commerce/config/billy-invoice/billy-mail
  3. Add the new action "Send commerce billy invoice mail." to the commerce order rule that shell trigger the mail sending. In most cases this is the Rule "Invoice order on completion" (Tech. name: "rules_commerce_billy_invoice_order_on_completion"). Select "commerce-order" in the dialog.
  4. Install and enable mailsystem.module and select "Standard" in the "Theme to render the emails" option to theme the PDF consistently with your standard shop theme!
  5. Now your customers automatically receive invoice E-Mails with PDF E-Mail attachments when the order status is set to "completed" (or other rule conditions as you have configured).
  6. For the PDF invoice attachment install the PDF library as described here on the Commerce Billy module page.

Typical issues

Receiving emails twice?
Check, if you have set your email address as cc recepient in the module settings.
Check your rules configration by enabling Show debug information => ALWAYS in Rules settings (admin/config/workflow/rules/settings)

No invoice emails sent?
See installation instructions above. If you don't set up a proper rule, no emails will be sent.
Furthermore ensure that the permission "Send arbitrary files" of mimemail.module is set for Administrators.
Sometimes it seems to help to check the MimeMail configuration like described here.

  • If you receive a WSOD on PDF generation, check your error log (or display) for such a message:
  • Fatal error: require_once(): Failed opening required '/.../sites/all/libraries/dompdf/lib/php-font-lib/classes/Font.php'
  • The DOMPDF was installed but the /dompdf/lib/php-font-lib/ folder is empty. Reason: The github download doesn't include the php-font-lib library, and it has to be downloaded separately.
  • See https://github.com/PhenX/php-font-lib and download the library.
  • Create the dompdf/lib/php-font-lib/classes/ directory.
  • In the zip file, take the contents of the src/FontLib/ folder and paste that into your newly created directory.
  • That's it!

Dependencies

Development proudly sponsored by German Drupal Friends & Companies:

webks: websolutions kept simple (https://www.webks.de)
and
DROWL: Drupalbasierte Lösungen aus Ostwestfalen-Lippe (OWL), Germany (https://www.drowl.de)

Supporting organizations: 
proudly developed this module for the community!

Project information

Releases