Version Description
- 2017-12-21 =
- Fixed: Failed SMTP connections generate fatal errors.
Download this release
Release Info
Developer | slaFFik |
Plugin | WP Mail SMTP by WPForms |
Version | 1.2.1 |
Comparing to | |
See all releases |
Code changes from version 1.2.0 to 1.2.1
- readme.txt +3 -0
- src/Admin/Pages/Test.php +0 -2
- src/Providers/MailerAbstract.php +10 -4
- wp_mail_smtp.php +2 -2
readme.txt
CHANGED
@@ -146,6 +146,9 @@ By all means please contact us to discuss features or options you'd like to see
|
|
146 |
|
147 |
== Changelog ==
|
148 |
|
|
|
|
|
|
|
149 |
= 1.2.0 - 2017-12-21 =
|
150 |
* Fixed: Decrease the factual minimum WordPress version from 3.9 to 3.6.
|
151 |
* Changed: Improve debug output for all mail providers.
|
146 |
|
147 |
== Changelog ==
|
148 |
|
149 |
+
= 1.2.1 - 2017-12-21 =
|
150 |
+
* Fixed: Failed SMTP connections generate fatal errors.
|
151 |
+
|
152 |
= 1.2.0 - 2017-12-21 =
|
153 |
* Fixed: Decrease the factual minimum WordPress version from 3.9 to 3.6.
|
154 |
* Changed: Improve debug output for all mail providers.
|
src/Admin/Pages/Test.php
CHANGED
@@ -202,8 +202,6 @@ class Test extends PageAbstract {
|
|
202 |
} else {
|
203 |
$smtp_text .= '[empty]';
|
204 |
}
|
205 |
-
|
206 |
-
array_push( $errors, $smtp_text );
|
207 |
}
|
208 |
|
209 |
$errors = apply_filters( 'wp_mail_smtp_admin_test_get_debug_messages', array(
|
202 |
} else {
|
203 |
$smtp_text .= '[empty]';
|
204 |
}
|
|
|
|
|
205 |
}
|
206 |
|
207 |
$errors = apply_filters( 'wp_mail_smtp_admin_test_get_debug_messages', array(
|
src/Providers/MailerAbstract.php
CHANGED
@@ -60,13 +60,14 @@ abstract class MailerAbstract implements MailerInterface {
|
|
60 |
*/
|
61 |
public function __construct( MailCatcher $phpmailer ) {
|
62 |
|
63 |
-
if ( empty( $this->url ) ) {
|
64 |
-
return;
|
65 |
-
}
|
66 |
-
|
67 |
$this->options = new Options();
|
68 |
$this->mailer = $this->options->get( 'mail', 'mailer' );
|
69 |
|
|
|
|
|
|
|
|
|
|
|
70 |
$this->process_phpmailer( $phpmailer );
|
71 |
}
|
72 |
|
@@ -89,6 +90,11 @@ abstract class MailerAbstract implements MailerInterface {
|
|
89 |
|
90 |
$this->phpmailer = $phpmailer;
|
91 |
|
|
|
|
|
|
|
|
|
|
|
92 |
$this->set_headers( $this->phpmailer->getCustomHeaders() );
|
93 |
$this->set_from( $this->phpmailer->From, $this->phpmailer->FromName );
|
94 |
$this->set_recipients(
|
60 |
*/
|
61 |
public function __construct( MailCatcher $phpmailer ) {
|
62 |
|
|
|
|
|
|
|
|
|
63 |
$this->options = new Options();
|
64 |
$this->mailer = $this->options->get( 'mail', 'mailer' );
|
65 |
|
66 |
+
// Only non-SMTP mailers need URL.
|
67 |
+
if ( ! $this->options->is_mailer_smtp() && empty( $this->url ) ) {
|
68 |
+
return;
|
69 |
+
}
|
70 |
+
|
71 |
$this->process_phpmailer( $phpmailer );
|
72 |
}
|
73 |
|
90 |
|
91 |
$this->phpmailer = $phpmailer;
|
92 |
|
93 |
+
// Prevent working with those methods, as they are not needed for SMTP-like mailers.
|
94 |
+
if ( $this->options->is_mailer_smtp() ) {
|
95 |
+
return;
|
96 |
+
}
|
97 |
+
|
98 |
$this->set_headers( $this->phpmailer->getCustomHeaders() );
|
99 |
$this->set_from( $this->phpmailer->From, $this->phpmailer->FromName );
|
100 |
$this->set_recipients(
|
wp_mail_smtp.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: WP Mail SMTP
|
4 |
-
* Version: 1.2.
|
5 |
* Plugin URI: https://wpforms.com/
|
6 |
* Description: Reconfigures the wp_mail() function to use SMTP instead of mail() and creates an options page to manage the settings.
|
7 |
* Author: WPForms
|
@@ -17,7 +17,7 @@
|
|
17 |
* http://www.gnu.org/licenses/gpl.txt
|
18 |
*/
|
19 |
|
20 |
-
define( 'WPMS_PLUGIN_VER', '1.2.
|
21 |
define( 'WPMS_PHP_VER', '5.3' );
|
22 |
|
23 |
/**
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: WP Mail SMTP
|
4 |
+
* Version: 1.2.1
|
5 |
* Plugin URI: https://wpforms.com/
|
6 |
* Description: Reconfigures the wp_mail() function to use SMTP instead of mail() and creates an options page to manage the settings.
|
7 |
* Author: WPForms
|
17 |
* http://www.gnu.org/licenses/gpl.txt
|
18 |
*/
|
19 |
|
20 |
+
define( 'WPMS_PLUGIN_VER', '1.2.1' );
|
21 |
define( 'WPMS_PHP_VER', '5.3' );
|
22 |
|
23 |
/**
|