test email attachments

This commit is contained in:
Nathan Coad
2018-06-16 17:47:49 +10:00
parent 855c114b2b
commit 0e35a832c1
3 changed files with 18 additions and 8 deletions

View File

@@ -974,6 +974,12 @@ function booking_mail($key, &$message, $params) {
$message['headers'] += $params['headers'];
}
// Add attachment when available.
// From https://drupal.stackexchange.com/questions/101035/send-attachments-with-drupal-mail
if (isset($params['attachment'])) {
$message['params']['attachments'][] = $params['attachment'];
}
//watchdog('booking_debug', "<pre>Mail hook:\n@info</pre>", array('@info' => print_r( $message, true)));
}