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 & 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' => $pdf_filecontent, // we use a dynamically created file.
'filename' => $filename, // can use any alias name here
'name' => $filename, // required for mandril and other libraries.
'filemime' => $filemime, // mime file type
'type' => $filemime, // required for mandril and other libraries
'list' => TRUE,
);
return $attachments;
}
Hope someone can help out!