function sparkpost_mail in Sparkpost email 7
Same name and namespace in other branches
- 8.2 sparkpost.module \sparkpost_mail()
- 7.2 sparkpost.module \sparkpost_mail()
Implements hook_mail().
File
- ./
sparkpost.module, line 72 - Sparkpost integration.
Code
function sparkpost_mail($key, &$message, $params) {
if ($key == 'test') {
$message['subject'] = $params['subject'];
$message['body'] = $params['body'];
if ($params['include_attachment']) {
$message['attachments'][] = drupal_realpath('misc/druplicon.png');
$message['body'][] = t('The Drupal icon is included as an attachment to test the attachment functionality.');
}
}
}