Skip to content

Commit

Permalink
queued does not work for gmail (#27)
Browse files Browse the repository at this point in the history
Feature: Added new property $response and new methods getResponse and getQueuedAs
  • Loading branch information
schengawegga committed Aug 11, 2023
1 parent 885f370 commit 25986c8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Mail/smtp.php
Original file line number Diff line number Diff line change
Expand Up @@ -380,11 +380,11 @@ protected function send_or_fail($recipients, $headers, $body)
/* Send the message's headers and the body as SMTP data. */
$res = $this->_smtp->data($body, $textHeaders);

list($code,$args) = $this->_smtp->getResponse();
list($code, $args) = $this->_smtp->getResponse();

$this->response = $code . ' ' . $args;

if (preg_match("/ queue (.*)| queued (.*)/i", $args, $queued)) {
if (preg_match("/ queued as (.*)/", $args, $queued)) {
$this->queued_as = $queued[1];
}

Expand Down Expand Up @@ -511,7 +511,8 @@ public function disconnect()
*
* @since 1.6.0
*/
public function getResponse(){
public function getResponse()
{
return $this->response;
}

Expand All @@ -522,7 +523,8 @@ public function getResponse(){
*
* @since 1.6.0
*/
public function getQueuedAs(){
public function getQueuedAs()
{
return $this->queued_as;
}

Expand Down

0 comments on commit 25986c8

Please sign in to comment.