Do something after sending email

Posted by Prem Tiwari | Updated on

Do something after sending email. I did some digging into the PHPMailer class and found that it supports a custom action.

Here’s how the callback is activated with the doCallback() method in the class.

There’s also a PHPMailer test on GitHub using this feature via the callbackAction() callback.

Here’s an example how we can apply this:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers