If you’ve spent any amount of time with WordPress, the chances are that you’ve experienced some sort of problem with emails. One of the most common functions in WordPress is wp_mail(), which allows WordPress core as well as plugins to send emails from the site to necessary parties. That could be new user accounts, password resets, event reminders or order confirmations.
In certain situations, the importance of these emails can be quite high. For example, if an online store fails to issue an email receipt, that could be a big problem. Worse yet, if the order is a digital product which is delivered by email, that problem gets even bigger.
Unfortunately, wp_mail() is not the most reliable way to send emails. It uses PHPMailer to send emails, which uses a PHP process on the server on which your WordPress install resides. This has many pitfalls:
If your site gets overloaded, PHP functions can time out. When they do, there’s no