updated plugin SMTP Mailer
version 1.1.3
This commit is contained in:
parent
a9ffa6605d
commit
71c1e3409e
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
Plugin Name: SMTP Mailer
|
Plugin Name: SMTP Mailer
|
||||||
Version: 1.1.2
|
Version: 1.1.3
|
||||||
Plugin URI: https://wphowto.net/smtp-mailer-plugin-for-wordpress-1482
|
Plugin URI: https://wphowto.net/smtp-mailer-plugin-for-wordpress-1482
|
||||||
Author: naa986
|
Author: naa986
|
||||||
Author URI: https://wphowto.net/
|
Author URI: https://wphowto.net/
|
||||||
@ -16,8 +16,8 @@ if (!defined('ABSPATH')){
|
|||||||
|
|
||||||
class SMTP_MAILER {
|
class SMTP_MAILER {
|
||||||
|
|
||||||
var $plugin_version = '1.1.2';
|
var $plugin_version = '1.1.3';
|
||||||
var $phpmailer_version = '6.3.0';
|
var $phpmailer_version = '6.5.3';
|
||||||
var $plugin_url;
|
var $plugin_url;
|
||||||
var $plugin_path;
|
var $plugin_path;
|
||||||
|
|
||||||
@ -796,13 +796,28 @@ function smtp_mailer_pre_wp_mail($null, $atts)
|
|||||||
*/
|
*/
|
||||||
do_action_ref_array( 'phpmailer_init', array( &$phpmailer ) );
|
do_action_ref_array( 'phpmailer_init', array( &$phpmailer ) );
|
||||||
|
|
||||||
|
$mail_data = compact( 'to', 'subject', 'message', 'headers', 'attachments' );
|
||||||
|
|
||||||
// Send!
|
// Send!
|
||||||
try {
|
try {
|
||||||
return $phpmailer->send();
|
$send = $phpmailer->send();
|
||||||
} catch ( PHPMailer\PHPMailer\Exception $e ) {
|
|
||||||
|
|
||||||
$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.
|
* 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
|
* @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.
|
* 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
Contributors: naa986
|
Contributors: naa986
|
||||||
Donate link: https://wphowto.net/
|
Donate link: https://wphowto.net/
|
||||||
Tags: email, mail, smtp, phpmailer
|
Tags: email, mail, smtp, phpmailer
|
||||||
Requires at least: 5.7
|
Requires at least: 5.9
|
||||||
Tested up to: 5.8
|
Tested up to: 5.9
|
||||||
Stable tag: 1.1.2
|
Stable tag: 1.1.3
|
||||||
License: GPLv2 or later
|
License: GPLv2 or later
|
||||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
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
|
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 Mailer Settings ===
|
||||||
|
|
||||||
* **SMTP Host**: Your outgoing mail server (e.g. smtp.gmail.com).
|
* **SMTP Host**: Your outgoing mail server (e.g. smtp.gmail.com).
|
||||||
@ -107,6 +103,9 @@ none
|
|||||||
|
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
|
||||||
|
= 1.1.3 =
|
||||||
|
* Updated the mail function for WordPress 5.9.
|
||||||
|
|
||||||
= 1.1.2 =
|
= 1.1.2 =
|
||||||
* Fixed an issue that could cause an Undefined variable error if $attachments was not set.
|
* Fixed an issue that could cause an Undefined variable error if $attachments was not set.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user