You are here

function queue_mail_send in Queue Mail 6

Same name and namespace in other branches
  1. 5 queue_mail.module \queue_mail_send()
  2. 7 queue_mail.module \queue_mail_send()

Email sending function, called from job queue, or as a fallback.

1 call to queue_mail_send()
drupal_mail_wrapper in ./queue_mail.inc
Wrapper function to use job queue
1 string reference to 'queue_mail_send'
drupal_mail_wrapper in ./queue_mail.inc
Wrapper function to use job queue

File

./queue_mail.module, line 6

Code

function queue_mail_send($message = array()) {
  $mimeheaders = array();
  foreach ($message['headers'] as $name => $value) {
    $mimeheaders[] = $name . ': ' . mime_header_encode($value);
  }
  return mail($message['to'], mime_header_encode($message['subject']), str_replace("\r", '', $message['body']), join("\n", $mimeheaders));
}