function mailgun_mail in Mailgun 7
Same name and namespace in other branches
- 8 mailgun.module \mailgun_mail()
Implements hook_mail().
File
- ./
mailgun.module, line 121 - Provides integration with Mailgun's email sending API.
Code
function mailgun_mail($key, &$message, $params) {
switch ($key) {
case 'test':
$message['subject'] = t('Mailgun test email');
$message['body'] = $params['message'];
if ($params['attachment']) {
$message['params']['attachments'] = array(
drupal_realpath('misc/druplicon.png'),
);
}
break;
}
}