You are here

public function MailhandlerMultipleEmailAuthenticate::authenticate in Mailhandler 6.2

Same name and namespace in other branches
  1. 7.2 modules/mailhandler_multiple_email/plugins/mailhandler/authenticate/MailhandlerMultipleEmailAuthenticate.class.php \MailhandlerMultipleEmailAuthenticate::authenticate()

Authenticates an incoming message.

Parameters

$item: Array containing message headers, body, and mailbox information.

Overrides MailhandlerAuthenticate::authenticate

File

modules/mailhandler_multiple_email/plugins/mailhandler/authenticate/MailhandlerMultipleEmailAuthenticate.class.php, line 9
MailhandlerMultipleEmailAuthenticate class.

Class

MailhandlerMultipleEmailAuthenticate
@file MailhandlerMultipleEmailAuthenticate class.

Code

public function authenticate(&$message, $mailbox) {
  list($fromaddress, $fromname) = _mailhandler_get_fromaddress($message['header'], $mailbox);
  $uid = 0;
  if ($address = multiple_email_find_address($fromaddress)) {
    $uid = $address->uid;
  }
  return $uid;
}