Version Description
Download this release
Release Info
Developer | chmac |
Plugin | WP Mail SMTP by WPForms |
Version | 0.7 |
Comparing to | |
See all releases |
Code changes from version 0.6 to 0.7
- readme.txt +1 -1
- wp_mail_smtp.php +8 -2
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.callum-macdonald.com/code/donate/
|
|
4 |
Tags: mail, smtp, wp_mail, mailer, phpmailer
|
5 |
Requires at least: 2.0
|
6 |
Tested up to: 2.5.1
|
7 |
-
Stable tag: 0.
|
8 |
|
9 |
Reconfigures the wp_mail() function to use SMTP instead of mail() and creates an options page to manage host, username, password, etc.
|
10 |
|
4 |
Tags: mail, smtp, wp_mail, mailer, phpmailer
|
5 |
Requires at least: 2.0
|
6 |
Tested up to: 2.5.1
|
7 |
+
Stable tag: 0.7
|
8 |
|
9 |
Reconfigures the wp_mail() function to use SMTP instead of mail() and creates an options page to manage host, username, password, etc.
|
10 |
|
wp_mail_smtp.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: WP-Mail-SMTP
|
4 |
-
Version: 0.
|
5 |
Plugin URI: http://www.callum-macdonald.com/code/wp-mail-smtp/
|
6 |
Description: Reconfigures the wp_mail() function to use SMTP instead of mail() and creates an options page to manage host, username, password, etc.
|
7 |
Author: Callum Macdonald
|
@@ -22,6 +22,7 @@ Author URI: http://www.callum-macdonald.com/
|
|
22 |
*
|
23 |
* CHANGELOG
|
24 |
*
|
|
|
25 |
* 0.6 - Added additional SMTP debugging output
|
26 |
* 0.5.2 - Fixed a pre 2.3 bug to do with mail from
|
27 |
* 0.5.1 - Added a check to display a warning on versions prior to 2.3
|
@@ -267,6 +268,11 @@ if (!function_exists('wp_mail_smtp_mail_from')) {
|
|
267 |
|
268 |
function wp_mail_smtp_mail_from ($orig) {
|
269 |
|
|
|
|
|
|
|
|
|
|
|
270 |
// If we can, use the is_email function to verify the email
|
271 |
if ( function_exists('is_email') && get_option('db_version') >= 6124 ) {
|
272 |
if ( is_email( get_option('mail_from') ) ) {
|
@@ -296,7 +302,7 @@ if (!function_exists('wp_mail_smtp_mail_from_name')) {
|
|
296 |
|
297 |
function wp_mail_smtp_mail_from_name ($orig) {
|
298 |
|
299 |
-
if (get_option('mail_from_name') != "" && is_string(get_option('mail_from_name'))) {
|
300 |
return get_option('mail_from_name');
|
301 |
}
|
302 |
else {
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: WP-Mail-SMTP
|
4 |
+
Version: 0.7
|
5 |
Plugin URI: http://www.callum-macdonald.com/code/wp-mail-smtp/
|
6 |
Description: Reconfigures the wp_mail() function to use SMTP instead of mail() and creates an options page to manage host, username, password, etc.
|
7 |
Author: Callum Macdonald
|
22 |
*
|
23 |
* CHANGELOG
|
24 |
*
|
25 |
+
* 0.7 - Added checks to only override the default from name / email
|
26 |
* 0.6 - Added additional SMTP debugging output
|
27 |
* 0.5.2 - Fixed a pre 2.3 bug to do with mail from
|
28 |
* 0.5.1 - Added a check to display a warning on versions prior to 2.3
|
268 |
|
269 |
function wp_mail_smtp_mail_from ($orig) {
|
270 |
|
271 |
+
// If the from email is not the default, return it unchanged
|
272 |
+
if ( $orig != 'wordpress@' . str_replace('www.','',strtolower($_SERVER['SERVER_NAME'])) ) {
|
273 |
+
return $orig;
|
274 |
+
}
|
275 |
+
|
276 |
// If we can, use the is_email function to verify the email
|
277 |
if ( function_exists('is_email') && get_option('db_version') >= 6124 ) {
|
278 |
if ( is_email( get_option('mail_from') ) ) {
|
302 |
|
303 |
function wp_mail_smtp_mail_from_name ($orig) {
|
304 |
|
305 |
+
if ($orig == 'WordPress' && get_option('mail_from_name') != "" && is_string(get_option('mail_from_name'))) {
|
306 |
return get_option('mail_from_name');
|
307 |
}
|
308 |
else {
|