There is a major issue that may cause PDF files to not appear in the e-mail, regardless of proper configuration/installation as outlined on the project page / documentation.

More often than not, the temporary files directory may be located outside the docroot (e.g. it is common to use /tmp, while the website is located at /var/www/public_html). This means that the file can only be accessed with an absolute path. I assume this problem is not new, as it is documented in code:

function _commerce_billy_mail_get_attachments($order) {
  // [...]
  // Add a secong prefix slash as quickfix for this issue: https://drupal.org/node/760080
  // TODO - Solve cleanly, when the mimemail bug is fixed. TODO
  $pdf_path = '/' . $pdf_path;
  $attachments[] = array(
    'filepath' => $pdf_path, //you have to use relative paths.
  // [...]

However, for me the quick and dirty fix of prepending an additional / to the absolute filepath does not seem to suffice when the temporary files directory lies outside of the docroot.

temporary:// = /tmp (/tmp)    #FAIL
temporary:// = sites/default/files/tmp (/var/www/project/public_html/sites/default/files/tmp)    #PASS

Is this a specific issue for me or are you seeing the same?

Comments

anybody’s picture

Hello, please try the latest .dev!
This dependency is now completely removed and the PDF is not saved to the server at all! :)

Please close this ticket afterwards.

anybody’s picture

Status: Active » Closed (fixed)

Closed due to inactivity.