function mandrill_mail in Mandrill 6
Same name and namespace in other branches
- 8 mandrill.module \mandrill_mail()
- 7.2 mandrill.module \mandrill_mail()
- 7 mandrill.module \mandrill_mail()
Implements hook_mail().
File
- ./
mandrill.module, line 79 - Enables Drupal to send email directly through MailChimp STS.
Code
function mandrill_mail($key, &$message, $params) {
if ($key == 'mandrill-test') {
$message['subject'] = $params['subject'];
$message['body'] = $params['body'];
if ($params['include_attachment']) {
$message['attachments'][] = realpath('misc/druplicon.png');
$message['body'] .= ' ' . t('The Drupal icon is included as an attachment to test the attachment functionality.');
}
}
}