$aux = $pop3->getParsedHeaders($i); if ($aux === FALSE) { $content .= "Headers not parsed.<br />"; } else { // else $aux not FALSE if (!isset($aux["From"])) { $aux['From'] = $aux['Return-path']; } $fromEmail = $aux["From"]; $fromEmail = str_replace('<', '', $fromEmail); $fromEmail = str_replace('>', '', $fromEmail); preg_match('/<?([-!#$%&\'*+\\.\\/0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\\.[-!#$%&\'*+\\.\\/0-9=?A-Z^_`a-z{|}~]+)>?/', $aux["From"], $mail); $email_from = $mail[1]; $aux["msgid"] = $i; $aux["realmsgid"] = preg_replace('/[<>]/', '', $aux["Message-ID"]); $message = $pop3->getMsg($i); $mimelib = new mime(); $output = $mimelib->decode($message); $content .= "<br />Reading a request.<br />From: " . $aux["From"] . "<br />Subject: " . $output['header']['subject'] . "<br />"; $content .= "sender email: " . $email_from . "<br />"; $aux["sender"]["user"] = $userlib->get_user_by_email($email_from); $content .= "sender user: "******"sender"]["user"] . "<br />"; $cantUseMailIn = $acc["anonymous"] == 'n' && empty($aux["sender"]["user"]); if ($cantUseMailIn) { $errorMsg = "Anonymous user access denied, sending auto-reply to email address: " . $fromEmail . "<br />"; $logslib->add_log('mailin', mailin_preplog($errorMsg), $logUser); $content .= $errorMsg; $mail = new TikiMail(); $mail->setFrom($acc["account"]); $l = $prefs['language']; $mail->setSubject(tra('Tiki mail-in auto-reply', $l));