Closed janneleppanen closed 3 years ago
@bkemper can you please consider merging this?
@janneleppanen Thank you for the contribution. @davekiss Thank you for the nudge. @JiveDig Thank you for verifying it is working correct (see https://github.com/SparkPost/wordpress-sparkpost/issues/162#issuecomment-718928088). I need to update the docs and I'll get this patch pushed ASAP.
Fixes #162
SparkPost plugin includes PHPMailer but don't include PHPMailer\Exception, which causes an error when sending email.
Error happens because WordPress Core will never include PHPMailer/Exception, because SparkPost has already included PHPMailer. WordPress won't include PHPMailer/Exception, bacause of this code in wp-includes/pluggable.php: