-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Mailer] Modify SmtpTransport so that SentMessage contains Mailersend message id when that transport is used #60692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hey! Thanks for your PR. You are targeting branch "7.4" but it seems your PR description refers to branch "6.4,". Cheers! Carsonbot |
It looks like you unchecked the "Allow edits from maintainer" box. That is fine, but please note that if you have multiple commits, you'll need to squash your commits into one before this can be merged. Or, you can check the "Allow edits from maintainers" box and the maintainer can squash for you. Cheers! Carsonbot |
@@ -156,7 +156,7 @@ 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', | |||
'/250 (Ok:?|Message) queued as (?P<id>[a-fA-Z0-9]+)\r?$/mis', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is already i
(camelcase) flag
'/250 (Ok:?|Message) queued as (?P<id>[a-fA-Z0-9]+)\r?$/mis', | |
'/250 (Ok:?|Message) queued as (?P<id>[A-Z0-9]+)\r?$/mis', |
Maybe a third regex should be added instead or modifying the second one. |
@@ -156,7 +156,7 @@ 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', | |||
'/250 (Ok:?|Message) queued as (?P<id>[A-Z0-9a-f]+)\r?$/mis', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a-f
is already covered by the A-Z
range as we are matching case-insensitively.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, thanks. Will modify.
…pture Mailersend ids
I am closing this pull request and the related issue because having looked at 3 third-party transports now I have questions about the relationship between the message-id initially created by mailer, why it would or would not be modified by SmtpTransport, and how all that relates to the message id that ESPs use in their webhooks. If I can create a coherent statement of my questions, I will post it as a fresh issue. |
Change to regex in SmtpTransport::parseMessageId() so that it will capture Mailersend message id from $mtaResult.
(Hope I did this correctly).