You are here

function maillog_mailengine in Maillog / Mail Developer 6

Implementation of hook_mailengine from mimemail modul

1 string reference to 'maillog_mailengine'
maillog_mail_send in ./maillog.module
Receive a command to send a mail.

File

./maillog.module, line 159
Provides a 'maillog' node type

Code

function maillog_mailengine($op, $message = NULL) {

  // default values
  if (is_array($message)) {
    $message = array_merge(array(
      'address' => '',
      'subject' => '',
      'body' => '',
      'sender' => '',
      'headers' => '',
    ), $message);
  }
  switch ($op) {
    case 'name':
      return t('Maillog Mail');
    case 'description':
      return t("Maillog engine using drupal_mail() or another mailengine from maillog_mailengine variable to send mail.");
    case 'settings':

      // not implemented
      return FALSE;
    case 'multiple':
    case 'single':
    case 'send':
      $message['from'] = $message['sender'];
      $message['to'] = $message['address'];
      unset($message['sender']);
      unset($message['address']);
      return maillog_mail_send($message, TRUE);
      break;
  }
}