diff --git a/wp-content/plugins/smtp-mailer/main.php b/wp-content/plugins/smtp-mailer/main.php index b7a41252..f79d9838 100644 --- a/wp-content/plugins/smtp-mailer/main.php +++ b/wp-content/plugins/smtp-mailer/main.php @@ -1,7 +1,7 @@ send(); - } catch ( PHPMailer\PHPMailer\Exception $e ) { + $send = $phpmailer->send(); - $mail_error_data = compact( 'to', 'subject', 'message', 'headers', 'attachments' ); - $mail_error_data['phpmailer_exception_code'] = $e->getCode(); + /** + * Fires after PHPMailer has successfully sent a mail. + * + * The firing of this action does not necessarily mean that the recipient received the + * email successfully. It only means that the `send` method above was able to + * process the request without any errors. + * + * @since 5.9.0 + * + * @param array $mail_data An array containing the mail recipient, subject, message, headers, and attachments. + */ + do_action( 'wp_mail_succeeded', $mail_data ); + + return $send; + } catch ( PHPMailer\PHPMailer\Exception $e ) { + $mail_data['phpmailer_exception_code'] = $e->getCode(); /** * Fires after a PHPMailer\PHPMailer\Exception is caught. @@ -812,7 +827,7 @@ function smtp_mailer_pre_wp_mail($null, $atts) * @param WP_Error $error A WP_Error object with the PHPMailer\PHPMailer\Exception message, and an array * containing the mail recipient, subject, message, headers, and attachments. */ - do_action( 'wp_mail_failed', new WP_Error( 'wp_mail_failed', $e->getMessage(), $mail_error_data ) ); + do_action( 'wp_mail_failed', new WP_Error( 'wp_mail_failed', $e->getMessage(), $mail_data ) ); return false; } diff --git a/wp-content/plugins/smtp-mailer/readme.txt b/wp-content/plugins/smtp-mailer/readme.txt index e2a46942..b32a78e2 100644 --- a/wp-content/plugins/smtp-mailer/readme.txt +++ b/wp-content/plugins/smtp-mailer/readme.txt @@ -2,9 +2,9 @@ Contributors: naa986 Donate link: https://wphowto.net/ Tags: email, mail, smtp, phpmailer -Requires at least: 5.7 -Tested up to: 5.8 -Stable tag: 1.1.2 +Requires at least: 5.9 +Tested up to: 5.9 +Stable tag: 1.1.3 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -16,10 +16,6 @@ Configure a SMTP server to send email from your WordPress site. Configure the wp https://www.youtube.com/watch?v=7O_jgtykcEk&rel=0 -=== Requirements === - -* A self-hosted website running on [WordPress hosting](https://wphowto.net/best-cheap-wordpress-hosting-1689) - === SMTP Mailer Settings === * **SMTP Host**: Your outgoing mail server (e.g. smtp.gmail.com). @@ -107,6 +103,9 @@ none == Changelog == += 1.1.3 = +* Updated the mail function for WordPress 5.9. + = 1.1.2 = * Fixed an issue that could cause an Undefined variable error if $attachments was not set.