Skip to content
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

Lacking SMTP::LastTransactionID When using MailerSend #2999

Open
YesThatGy opened this issue Jan 2, 2024 · 2 comments
Open

Lacking SMTP::LastTransactionID When using MailerSend #2999

YesThatGy opened this issue Jan 2, 2024 · 2 comments

Comments

@YesThatGy
Copy link

Problem description

With current version of phpMailer, using smtp->getLastTransactionID() returns false.

Code to reproduce

$smtp->send();
$smtp_transaction_id = $smtp->getLastTransactionID();
var_export($smtp_transaction_id);

Simple fix is below:

[bens@tesla sb4]$ hg diff sb/modules/phpmailer/vendor/phpmailer/phpmailer/src/SMTP.php
diff -r f26ab610cc95 sb/modules/phpmailer/vendor/phpmailer/phpmailer/src/SMTP.php
--- a/sb/modules/phpmailer/vendor/phpmailer/phpmailer/src/SMTP.php Sat Dec 30 14:31:06 2023 -0800
+++ b/sb/modules/phpmailer/vendor/phpmailer/phpmailer/src/SMTP.php Mon Jan 01 21:22:24 2024 -0800
@@ -185,6 +185,7 @@
'Amazon_SES' => '/[\d]{3} Ok (.)/',
'SendGrid' => '/[\d]{3} Ok: queued as (.
)/',
'CampaignMonitor' => '/[\d]{3} 2.0.0 OK:([a-zA-Z\d]{48})/',

  •                           'MailerSend' => '/[\d]{3} Message queued as (.*)/'
    

    ];

    /**

@YesThatGy
Copy link
Author

Online editor made a dog's breakfast out of the diff, I've also posted it here:
https://effortlessis.com/mailersend.txt

Thanks for the excellent project!!

@Synchro
Copy link
Member

Synchro commented Jan 3, 2024

I'm not sure why you're getting that result, because that exact pattern is already there – it's the same as for ZoneMTA.

Vijay-Chaudhary pushed a commit to Vijay-Chaudhary/PHPMailer that referenced this issue Jan 7, 2024
… function within PHPMailer. This enhancement enables you to directly invoke getLastTransactionID on PHPMailer itself
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants