diff options
author | yehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664> | 2020-01-13 06:59:45 +0000 |
---|---|---|
committer | yehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664> | 2020-01-13 06:59:45 +0000 |
commit | 3686a6e1793a2c5af8b7ee4459e20887f08dc720 (patch) | |
tree | 88f1846b220499ca3fe9809064ba5e6070e642d9 | |
parent | 2850339b7b0f53042c2f27e7802e273c36d1cef8 (diff) | |
download | Post-SMTP-3686a6e1793a2c5af8b7ee4459e20887f08dc720.zip |
* Fixed: Notify on error bug - crash site
* Fixed: From header
-rw-r--r-- | Postman/Extensions/Core/Notifications/PostmanNotify.php | 4 | ||||
-rw-r--r-- | Postman/Extensions/Core/Notifications/PostmanNotifyOptions.php | 13 | ||||
-rw-r--r-- | Postman/Phpmailer/PostsmtpMailer.php | 2 | ||||
-rw-r--r-- | postman-smtp.php | 5 | ||||
-rw-r--r-- | readme.txt | 6 |
5 files changed, 24 insertions, 6 deletions
diff --git a/Postman/Extensions/Core/Notifications/PostmanNotify.php b/Postman/Extensions/Core/Notifications/PostmanNotify.php index d9f6a58..ae505cf 100644 --- a/Postman/Extensions/Core/Notifications/PostmanNotify.php +++ b/Postman/Extensions/Core/Notifications/PostmanNotify.php @@ -15,9 +15,11 @@ class PostmanNotify { const NOTIFICATIONS_PUSHOVER_CRED = 'postman_pushover_cred'; const NOTIFICATIONS_SLACK_CRED = 'postman_slack_cred'; + private $options; + public function __construct() { - $this->options = new PostmanNotifyOptions(); + $this->options = PostmanNotifyOptions::getInstance(); add_filter( 'post_smtp_admin_tabs', array( $this, 'tabs' ) ); add_action( 'post_smtp_settings_menu', array( $this, 'menu' ) ); diff --git a/Postman/Extensions/Core/Notifications/PostmanNotifyOptions.php b/Postman/Extensions/Core/Notifications/PostmanNotifyOptions.php index 08c27db..2973eb9 100644 --- a/Postman/Extensions/Core/Notifications/PostmanNotifyOptions.php +++ b/Postman/Extensions/Core/Notifications/PostmanNotifyOptions.php @@ -12,7 +12,18 @@ class PostmanNotifyOptions { private $options; - public function __construct() + private static $instance; + + public static function getInstance() + { + if ( ! self::$instance ) { + self::$instance = new static; + } + + return self::$instance; + } + + private function __construct() { $this->options = get_option( 'postman_options' ); } diff --git a/Postman/Phpmailer/PostsmtpMailer.php b/Postman/Phpmailer/PostsmtpMailer.php index e52091d..838cdc5 100644 --- a/Postman/Phpmailer/PostsmtpMailer.php +++ b/Postman/Phpmailer/PostsmtpMailer.php @@ -39,7 +39,7 @@ class PostsmtpMailer extends PHPMailer { public function hooks() { if ( $this->options->getTransportType() == 'smtp' ) { - add_action( 'phpmailer_init', array( $this, 'phpmailer_smtp_init' ) ); + add_action( 'phpmailer_init', array( $this, 'phpmailer_smtp_init' ), 999 ); } } diff --git a/postman-smtp.php b/postman-smtp.php index 23d30b6..e93ab37 100644 --- a/postman-smtp.php +++ b/postman-smtp.php @@ -6,7 +6,7 @@ if ( ! defined( 'ABSPATH' ) ) { * Plugin Name: Post SMTP * Plugin URI: https://wordpress.org/plugins/post-smtp/ * Description: Email not reliable? Post SMTP is the first and only WordPress SMTP plugin to implement OAuth 2.0 for Gmail, Hotmail and Yahoo Mail. Setup is a breeze with the Configuration Wizard and integrated Port Tester. Enjoy worry-free delivery even if your password changes! - * Version: 2.0.8 + * Version: 2.0.9 * Author: Yehuda Hassine * Text Domain: post-smtp * Author URI: https://postmansmtp.com @@ -44,7 +44,7 @@ if ( ! defined( 'ABSPATH' ) ) { define( 'POST_SMTP_BASE', __FILE__ ); define( 'POST_SMTP_PATH', __DIR__ ); define( 'POST_SMTP_URL', plugins_url('', POST_SMTP_BASE ) ); -define( 'POST_SMTP_VER', '2.0.8' ); +define( 'POST_SMTP_VER', '2.0.9' ); define( 'POST_SMTP_SHOW_RELEASE_MESSAGE', true ); define( 'POST_SMTP_RELEASE_MESSAGE', 'We have a new Facebook group, feel free to join.' ); define( 'POST_SMTP_RELEASE_URL', 'https://www.facebook.com/groups/post.smtp' ); @@ -142,3 +142,4 @@ function post_setupPostman() { $kevinCostner = new Postman( __FILE__, POST_SMTP_VER ); do_action( 'post_smtp_init'); } + @@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=yehuda@m Tags: postman smtp, postman, smtp, email, mail, mailer, email log, oauth2, gmail, google apps, hotmail, yahoo, mandrill api, sendgrid api, elastic email, office365, mailgun Requires at least: 3.9 Tested up to: 5.3.2 -Stable tag: 2.0.8 +Stable tag: 2.0.9 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -286,6 +286,10 @@ To avoid being flagged as spam, you need to prove your email isn't forged. On a == Changelog == += 2.0.9 - 2020-01-13 +* Fixed: Notify on error bug - crash site +* Fixed: From header + = 2.0.8 - 2020-01-12 * Updated: Reply-To header bug |