function SmtpTransport::parseMessageId
1 call to SmtpTransport::parseMessageId()
- SmtpTransport::doSend in vendor/
symfony/ mailer/ Transport/ Smtp/ SmtpTransport.php
File
-
vendor/
symfony/ mailer/ Transport/ Smtp/ SmtpTransport.php, line 156
Class
- SmtpTransport
- Sends emails over SMTP.
Namespace
Symfony\Component\Mailer\Transport\SmtpCode
protected function parseMessageId(string $mtaResult) : string {
$regexps = [
'/250 Ok (?P<id>[0-9a-f-]+)\\r?$/mis',
'/250 Ok:? queued as (?P<id>[A-Z0-9]+)\\r?$/mis',
];
$matches = [];
foreach ($regexps as $regexp) {
if (preg_match($regexp, $mtaResult, $matches)) {
return $matches['id'];
}
}
return '';
}