You are here

function mailgun_mail in Mailgun 8

Same name and namespace in other branches
  1. 7 mailgun.module \mailgun_mail()

Implements hook_mail().

File

./mailgun.module, line 70
Contains mailgun.module.

Code

function mailgun_mail($key, &$message, $params) {
  switch ($key) {
    case 'test_form_email':
      $message['body'] = $message['params']['body'];
      $message['subject'] = $message['params']['subject'];
      if (isset($params['cc'])) {
        $message['headers']['Cc'] = $params['cc'];
      }
      if (isset($params['bcc'])) {
        $message['headers']['Bcc'] = $params['bcc'];
      }
      break;
  }
}