Post SMTP Mailer/Email Log - Version 2.0.27

Version Description

  • 2022-05-19 = Add notice about Google Less Secure App.
Download this release

Release Info

Developer wpexpertsio
Plugin Icon 128x128 Post SMTP Mailer/Email Log
Version 2.0.27
Comparing to
See all releases

Code changes from version 2.0.26 to 2.0.27

Postman/Postman-Mail/PostmanModuleTransport.php CHANGED
@@ -682,6 +682,9 @@ abstract class PostmanAbstractZendModuleTransport extends PostmanAbstractModuleT
682
  }
683
 
684
  /**
 
 
 
685
  */
686
  public function createOverrideMenu(PostmanWizardSocket $socket, $winningRecommendation, $userSocketOverride, $userAuthOverride) {
687
  $overrideItem = parent::createOverrideMenu ( $socket, $winningRecommendation, $userSocketOverride, $userAuthOverride );
@@ -709,14 +712,8 @@ abstract class PostmanAbstractZendModuleTransport extends PostmanAbstractModuleT
709
  $noAuthMode = true;
710
  }
711
  }
 
712
  if ($selected) {
713
- if ($socket->auth_crammd5 || $socket->auth_login || $socket->authPlain) {
714
- array_push ( $overrideAuthItems, array (
715
- 'selected' => $passwordMode,
716
- 'name' => __ ( 'Password (requires username and password)', 'post-smtp' ),
717
- 'value' => 'password'
718
- ) );
719
- }
720
  if ($socket->auth_xoauth || $winningRecommendation ['auth'] == 'oauth2') {
721
  array_push ( $overrideAuthItems, array (
722
  'selected' => $oauth2Mode,
@@ -724,6 +721,13 @@ abstract class PostmanAbstractZendModuleTransport extends PostmanAbstractModuleT
724
  'value' => 'oauth2'
725
  ) );
726
  }
 
 
 
 
 
 
 
727
  if ($socket->auth_none) {
728
  array_push ( $overrideAuthItems, array (
729
  'selected' => $noAuthMode,
682
  }
683
 
684
  /**
685
+ *
686
+ * @since 2.0.27 OAuth 2.0 will be selected by default as Google is disabling less secure Apps.
687
+ * @version 1.1
688
  */
689
  public function createOverrideMenu(PostmanWizardSocket $socket, $winningRecommendation, $userSocketOverride, $userAuthOverride) {
690
  $overrideItem = parent::createOverrideMenu ( $socket, $winningRecommendation, $userSocketOverride, $userAuthOverride );
712
  $noAuthMode = true;
713
  }
714
  }
715
+
716
  if ($selected) {
 
 
 
 
 
 
 
717
  if ($socket->auth_xoauth || $winningRecommendation ['auth'] == 'oauth2') {
718
  array_push ( $overrideAuthItems, array (
719
  'selected' => $oauth2Mode,
721
  'value' => 'oauth2'
722
  ) );
723
  }
724
+ if ($socket->auth_crammd5 || $socket->auth_login || $socket->authPlain) {
725
+ array_push ( $overrideAuthItems, array (
726
+ 'selected' => $passwordMode,
727
+ 'name' => __ ( 'Password (requires username and password) <span class=\'ps-less-secure\'>Not recommended </span>(Starting May 30, 2022, ​​Google will no longer support the use of third-party apps or devices which ask you to sign in to your Google Account using only your username and password.) <a href=\'https://postmansmtp.com/gmail-is-disabling-less-secure-apps\' target="_blank">Learn More</a>', 'post-smtp' ),
728
+ 'value' => 'password'
729
+ ) );
730
+ }
731
  if ($socket->auth_none) {
732
  array_push ( $overrideAuthItems, array (
733
  'selected' => $noAuthMode,
Postman/PostmanViewController.php CHANGED
@@ -34,6 +34,9 @@ if ( ! class_exists( 'PostmanViewController' ) ) {
34
  $this->oauthScribe = $oauthScribe;
35
  $this->adminController = $adminController;
36
  $this->logger = new PostmanLogger( get_class( $this ) );
 
 
 
37
  PostmanUtils::registerAdminMenu( $this, 'generateDefaultContent' );
38
  PostmanUtils::registerAdminMenu( $this, 'addPurgeDataSubmenu' );
39
 
@@ -42,6 +45,10 @@ if ( ! class_exists( 'PostmanViewController' ) ) {
42
  add_action( 'wp_ajax_delete_lock_file', array( $this, 'delete_lock_file' ) );
43
  add_action( 'wp_ajax_dismiss_version_notify', array( $this, 'dismiss_version_notify' ) );
44
  add_action( 'wp_ajax_dismiss_donation_notify', array( $this, 'dismiss_donation_notify' ) );
 
 
 
 
45
 
46
  //add_action( 'admin_init', array( $this, 'do_activation_redirect' ) );
47
 
@@ -395,6 +402,23 @@ if ( ! class_exists( 'PostmanViewController' ) ) {
395
  </div>
396
  <?php
397
  }
398
- }
399
- }
400
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  $this->oauthScribe = $oauthScribe;
35
  $this->adminController = $adminController;
36
  $this->logger = new PostmanLogger( get_class( $this ) );
37
+ $hostname = PostmanOptions::getInstance()->getHostname();
38
+ $auth_type = PostmanOptions::getInstance()->getAuthenticationType();
39
+
40
  PostmanUtils::registerAdminMenu( $this, 'generateDefaultContent' );
41
  PostmanUtils::registerAdminMenu( $this, 'addPurgeDataSubmenu' );
42
 
45
  add_action( 'wp_ajax_delete_lock_file', array( $this, 'delete_lock_file' ) );
46
  add_action( 'wp_ajax_dismiss_version_notify', array( $this, 'dismiss_version_notify' ) );
47
  add_action( 'wp_ajax_dismiss_donation_notify', array( $this, 'dismiss_donation_notify' ) );
48
+
49
+ if( $hostname == 'smtp.gmail.com' && $auth_type == 'plain' ) {
50
+ add_action( 'admin_notices', array( $this, 'google_less_secure_notice' ) );
51
+ }
52
 
53
  //add_action( 'admin_init', array( $this, 'do_activation_redirect' ) );
54
 
402
  </div>
403
  <?php
404
  }
 
 
405
 
406
+ public function google_less_secure_notice() {
407
+
408
+ ?>
409
+ <div class="notice notice-error is-dismissible">
410
+ <?php
411
+ printf(
412
+ '<p>%1$s <br />%2$s <a href="%3$s" target="_blank">%4$s</a></p>',
413
+ esc_html__( '"To help keep your account secure, starting May 30, 2022, ​​Google will no longer support the use of third-party apps or devices which ask you to sign in to your Google Account using only your username and password."', 'post-smtp' ),
414
+ esc_html__( 'You can switch to Auth 2.0 option to continue without any downtime.', 'post-smtp' ),
415
+ esc_url( 'https://postmansmtp.com/gmail-is-disabling-less-secure-apps' ),
416
+ esc_html__( 'Click here for more info', 'post-smtp' )
417
+ );
418
+ ?>
419
+ </div>
420
+ <?php
421
+
422
+ }
423
+ }
424
+ }
postman-smtp.php CHANGED
@@ -6,7 +6,7 @@ if ( ! defined( 'ABSPATH' ) ) {
6
  * Plugin Name: Post SMTP
7
  * Plugin URI: https://wordpress.org/plugins/post-smtp/
8
  * 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!
9
- * Version: 2.0.26
10
  * Author: Post SMTP
11
  * Text Domain: post-smtp
12
  * Author URI: https://postmansmtp.com
@@ -35,7 +35,7 @@ if ( ! defined( 'ABSPATH' ) ) {
35
  define( 'POST_SMTP_BASE', __FILE__ );
36
  define( 'POST_SMTP_PATH', __DIR__ );
37
  define( 'POST_SMTP_URL', plugins_url('', POST_SMTP_BASE ) );
38
- define( 'POST_SMTP_VER', '2.0.26' );
39
  define( 'POST_SMTP_SHOW_RELEASE_MESSAGE', true );
40
  define( 'POST_SMTP_RELEASE_MESSAGE', "THE FUTURE OF Post SMTP - PLEASE READ!" );
41
  define( 'POST_SMTP_RELEASE_URL', 'https://postmansmtp.com/the-future-of-post-smtp/' );
6
  * Plugin Name: Post SMTP
7
  * Plugin URI: https://wordpress.org/plugins/post-smtp/
8
  * 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!
9
+ * Version: 2.0.27
10
  * Author: Post SMTP
11
  * Text Domain: post-smtp
12
  * Author URI: https://postmansmtp.com
35
  define( 'POST_SMTP_BASE', __FILE__ );
36
  define( 'POST_SMTP_PATH', __DIR__ );
37
  define( 'POST_SMTP_URL', plugins_url('', POST_SMTP_BASE ) );
38
+ define( 'POST_SMTP_VER', '2.0.27' );
39
  define( 'POST_SMTP_SHOW_RELEASE_MESSAGE', true );
40
  define( 'POST_SMTP_RELEASE_MESSAGE', "THE FUTURE OF Post SMTP - PLEASE READ!" );
41
  define( 'POST_SMTP_RELEASE_URL', 'https://postmansmtp.com/the-future-of-post-smtp/' );
readme.txt CHANGED
@@ -3,8 +3,8 @@ Plugin URI: https://wpexperts.io/
3
  Contributors: wpexpertsio
4
  Tags: postman smtp, postman, smtp, email, mail, mailer, email log, oauth2, gmail, google apps, hotmail, yahoo, mandrill api, sendgrid api, elastic email, office365, mailgun
5
  Requires at least: 3.9
6
- Tested up to: 5.9.3
7
- Stable tag: 2.0.26
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -281,6 +281,9 @@ To avoid being flagged as spam, you need to prove your email isn't forged. On a
281
 
282
  == Changelog ==
283
 
 
 
 
284
  = 2.0.26 - 2022-04-22 =
285
  * **Bug Fixes**
286
  * Email header was broken in some cases.
3
  Contributors: wpexpertsio
4
  Tags: postman smtp, postman, smtp, email, mail, mailer, email log, oauth2, gmail, google apps, hotmail, yahoo, mandrill api, sendgrid api, elastic email, office365, mailgun
5
  Requires at least: 3.9
6
+ Tested up to: 6.0
7
+ Stable tag: 2.0.27
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
281
 
282
  == Changelog ==
283
 
284
+ = 2.0.27 - 2022-05-19 =
285
+ Add notice about Google Less Secure App.
286
+
287
  = 2.0.26 - 2022-04-22 =
288
  * **Bug Fixes**
289
  * Email header was broken in some cases.
style/postman.css CHANGED
@@ -140,6 +140,14 @@ p#back_to_main_menu {
140
  background: #fff;
141
  }
142
 
 
 
 
 
 
 
 
 
143
 
144
  @keyframes pulse {
145
  0% {
140
  background: #fff;
141
  }
142
 
143
+ .ps-less-secure {
144
+ color: red;
145
+ }
146
+
147
+ #user_auth_override td {
148
+ padding-bottom: 15px;
149
+ }
150
+
151
 
152
  @keyframes pulse {
153
  0% {