mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-08 00:21:59 +01:00
syslog the queue id of the restored email
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
b3f37f2964
commit
e4f64b41bc
@ -5,6 +5,7 @@ class ModelMailMail extends Model {
|
||||
|
||||
public function send_smtp_email($smtphost, $smtpport, $yourdomain, $from, $to = array(), $msg){
|
||||
$ok = 0;
|
||||
$queue_id = '';
|
||||
|
||||
if($to == "" || strlen($msg) < 30){ return $ok; }
|
||||
|
||||
@ -40,14 +41,14 @@ class ModelMailMail extends Model {
|
||||
|
||||
$l = fgets($r, 4096);
|
||||
|
||||
if(preg_match("/^250/", $l)){ $ok = 1; }
|
||||
if(preg_match("/^250/", $l)){ $queue_id = $l; $ok = 1; }
|
||||
|
||||
fputs($r, "QUIT\r\n");
|
||||
$l = fgets($r, 4096);
|
||||
|
||||
fclose($r);
|
||||
|
||||
syslog(LOG_INFO, "sending mail from=$from, rcpt=" . implode(" ", $to) . ", status=$ok");
|
||||
syslog(LOG_INFO, "sending mail from=$from, rcpt=" . implode(" ", $to) . ", status=$ok, queue_id=$queue_id");
|
||||
|
||||
return $ok;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user