Commerce billy mail: how to attach multiple files to an email I have module commerce billy mail working. Additionally to the invoice PDF that is attached to the mail, I would like to send two more files (terms &amp; conditions and a price list).

Here's the function _commerce_billy_mail_get_attachments from the file commerce_billy_mail.module, it seems to be the appropriate function (?), but I don't know how to add the additional files:

function _commerce_billy_mail_get_attachments($order) {
  $attachments = array();

  list($html, $filename) = commerce_billy_mail_pdf_prepare($order);
  $pdf_filecontent = commerce_billy_mail_pdf_create($html, $filename);
  $filemime = 'application/pdf';
  $attachments[] = array(
    'filecontent' =&gt; $pdf_filecontent, // we use a dynamically created file.
    'filename' =&gt; $filename, // can use any alias name here
    'name' =&gt; $filename, // required for mandril and other libraries.
    'filemime' =&gt; $filemime, // mime file type
    'type' =&gt; $filemime, // required for mandril and other libraries
    'list' =&gt; TRUE,
  );

  return $attachments;
}


Hope someone can help out!
I found out, how to attach multiple Attachments:

  $attachments[] = array(
    'filename' =&gt; 'MyDoc.pdf', // can use any alias name here
    'name' =&gt; 'MyDoc.pdf', // required for mandril and other libraries.
    'filemime' =&gt; 'application/pdf', // mime file type
    'type' =&gt; 'application/pdf', // required for mandril and other libraries
    'list' =&gt; TRUE,
    'filepath' =&gt; 'sites/default/files/mail_attachments/MyDoc.pdf',
  );