From f10b852369593a991ca4daccfbf21ac59469bf69 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Tue, 3 May 2016 13:16:26 +0000 Subject: [PATCH] smtp : Return the last message of the server when sending mail. There is the queue message id stored in it git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2715 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- smtp.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/smtp.php b/smtp.php index bd9d119..2f5fc3c 100644 --- a/smtp.php +++ b/smtp.php @@ -89,6 +89,8 @@ class smtp * @param string|array $to the recipient of the email. Not displayed in the * email content * @param $completeMail The content of the email + * @return the message from the server (where is stored the message queue + * identifier */ public function send ($from, $to, $completeMail) { @@ -104,7 +106,7 @@ class smtp $this->putLine ("DATA\r\n"); if (substr ($completeMail, -2) !== "\r\n") $completeMail .= "\r\n"; - $this->putLine ("$completeMail.\r\n"); + return $this->putLine ("$completeMail.\r\n"); } /** Disconnect from the SMTP server */