mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-08 05:11:59 +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';
|
require_once 'Zend/Mail/Protocol/Smtp/Auth/Login.php';
|
||||||
|
|
||||||
$ok = 0;
|
$ok = 0;
|
||||||
$queue_id = '';
|
|
||||||
|
|
||||||
if($to == "" || strlen($msg) < 30){ return $ok; }
|
if($to == "" || strlen($msg) < 30){ return $ok; }
|
||||||
|
|
||||||
@ -87,14 +86,14 @@ class ModelMailMail extends Model {
|
|||||||
$connection->data($msg);
|
$connection->data($msg);
|
||||||
|
|
||||||
$connectionResponse = $connection->getResponse();
|
$connectionResponse = $connection->getResponse();
|
||||||
|
|
||||||
$connectionResponseArray = explode(" ", $connectionResponse[0]);
|
$connectionResponseArray = explode(" ", $connectionResponse[0]);
|
||||||
|
|
||||||
if (array_key_exists('2', $connectionResponseArray)) {
|
$queue_id = '';
|
||||||
$queue_id = $connectionResponseArray[2];
|
|
||||||
}
|
|
||||||
|
|
||||||
if($connectionResponseArray[0] == 250) {
|
if($connectionResponseArray[0] == 250) {
|
||||||
$ok = 1;
|
$ok = 1;
|
||||||
|
$queue_id = trim($connectionResponse[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
syslog(LOG_INFO, "sending mail from=$from, rcpt=" . implode(" ", $to) . ", status=$ok, queue_id=$queue_id");
|
syslog(LOG_INFO, "sending mail from=$from, rcpt=" . implode(" ", $to) . ", status=$ok, queue_id=$queue_id");
|
||||||
|
Loading…
Reference in New Issue
Block a user