diff --git a/src/SMTP.php b/src/SMTP.php index 5f6f8b17..8411b476 100644 --- a/src/SMTP.php +++ b/src/SMTP.php @@ -146,11 +146,13 @@ class SMTP /** * @var array Patterns to extract an SMTP transaction id from reply to a DATA command. * The first capture group in each regex will be used as the ID. + * MS ESMTP returns the message ID, which may not be correct for internal tracking. */ protected $smtp_transaction_id_patterns = [ 'exim' => '/[0-9]{3} OK id=(.*)/', 'sendmail' => '/[0-9]{3} 2.0.0 (.*) Message/', - 'postfix' => '/[0-9]{3} 2.0.0 Ok: queued as (.*)/' + 'postfix' => '/[0-9]{3} 2.0.0 Ok: queued as (.*)/', + 'Microsoft_ESMTP' => '/[0-9]{3} 2.[0-9].0 (.*)@(?:.*) Queued mail for delivery/' ]; /**