mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-07 23:01:58 +01:00
Fixed queue id handling in mail model
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
5a64f804ad
commit
68074767b7
@ -9,7 +9,6 @@ class ModelMailMail extends Model {
|
||||
require_once 'Zend/Mail/Protocol/Smtp/Auth/Login.php';
|
||||
|
||||
$ok = 0;
|
||||
$queue_id = '';
|
||||
|
||||
if($to == "" || strlen($msg) < 30){ return $ok; }
|
||||
|
||||
@ -87,14 +86,14 @@ class ModelMailMail extends Model {
|
||||
$connection->data($msg);
|
||||
|
||||
$connectionResponse = $connection->getResponse();
|
||||
|
||||
$connectionResponseArray = explode(" ", $connectionResponse[0]);
|
||||
|
||||
if (array_key_exists('2', $connectionResponseArray)) {
|
||||
$queue_id = $connectionResponseArray[2];
|
||||
}
|
||||
$queue_id = '';
|
||||
|
||||
if ($connectionResponseArray[0] == 250) {
|
||||
if($connectionResponseArray[0] == 250) {
|
||||
$ok = 1;
|
||||
$queue_id = trim($connectionResponse[0]);
|
||||
}
|
||||
|
||||
syslog(LOG_INFO, "sending mail from=$from, rcpt=" . implode(" ", $to) . ", status=$ok, queue_id=$queue_id");
|
||||
|
Loading…
Reference in New Issue
Block a user