Version Description
- Fix for a long standing bug that caused an error during plugin activation.
Download this release
Release Info
Developer | chmac |
Plugin | WP Mail SMTP by WPForms |
Version | 0.8.7 |
Comparing to | |
See all releases |
Code changes from version 0.8.6 to 0.8.7
- langs/wp_mail_smtp-he_IL.mo +0 -0
- langs/wp_mail_smtp-ja.mo +0 -0
- readme.txt +19 -8
- wp_mail_smtp.php +16 -30
langs/wp_mail_smtp-he_IL.mo
ADDED
Binary file
|
langs/wp_mail_smtp-ja.mo
ADDED
Binary file
|
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.7
|
6 |
Tested up to: 3.0.1
|
7 |
-
Stable tag: 0.8.
|
8 |
|
9 |
Reconfigures the wp_mail() function to use SMTP instead of mail() and creates an options page to manage the settings.
|
10 |
|
@@ -14,13 +14,13 @@ This plugin reconfigures the wp_mail() function to use SMTP instead of mail() an
|
|
14 |
|
15 |
You can set the following options:
|
16 |
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
|
25 |
== Installation ==
|
26 |
|
@@ -62,6 +62,14 @@ By all means please contact me to discuss features or options you'd like to see
|
|
62 |
|
63 |
== Changelog ==
|
64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
= 0.8.6 =
|
66 |
* The Settings link really does work this time, promise. Apologies for the unnecessary updates.
|
67 |
|
@@ -126,6 +134,9 @@ By all means please contact me to discuss features or options you'd like to see
|
|
126 |
|
127 |
== Upgrade Notice ==
|
128 |
|
|
|
|
|
|
|
129 |
= 0.8.6 =
|
130 |
Low priority update. The Settings link was still broken in 0.8.5.
|
131 |
|
4 |
Tags: mail, smtp, wp_mail, mailer, phpmailer
|
5 |
Requires at least: 2.7
|
6 |
Tested up to: 3.0.1
|
7 |
+
Stable tag: 0.8.7
|
8 |
|
9 |
Reconfigures the wp_mail() function to use SMTP instead of mail() and creates an options page to manage the settings.
|
10 |
|
14 |
|
15 |
You can set the following options:
|
16 |
|
17 |
+
* Specify the from name and email address for outgoing email.
|
18 |
+
* Choose to send mail by SMTP or PHP's mail() function.
|
19 |
+
* Specify an SMTP host (defaults to localhost).
|
20 |
+
* Specify an SMTP port (defaults to 25).
|
21 |
+
* Choose SSL / TLS encryption (not the same as STARTTLS).
|
22 |
+
* Choose to use SMTP authentication or not (defaults to not).
|
23 |
+
* Specify an SMTP username and password.
|
24 |
|
25 |
== Installation ==
|
26 |
|
62 |
|
63 |
== Changelog ==
|
64 |
|
65 |
+
= next =
|
66 |
+
* Typo in the From email description.
|
67 |
+
* Removed changelog from plugin file, no need to duplicate it.
|
68 |
+
* Set $phpmailer->Sender from from email, helps with sendmail / mail().
|
69 |
+
|
70 |
+
= 0.8.7 =
|
71 |
+
* Fix for a long standing bug that caused an error during plugin activation.
|
72 |
+
|
73 |
= 0.8.6 =
|
74 |
* The Settings link really does work this time, promise. Apologies for the unnecessary updates.
|
75 |
|
134 |
|
135 |
== Upgrade Notice ==
|
136 |
|
137 |
+
= 0.8.7 =
|
138 |
+
Very low priority update. Fixes a bug that causes a spurious error during activation.
|
139 |
+
|
140 |
= 0.8.6 =
|
141 |
Low priority update. The Settings link was still broken in 0.8.5.
|
142 |
|
wp_mail_smtp.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: WP-Mail-SMTP
|
4 |
-
Version: 0.8.
|
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 the settings.
|
7 |
Author: Callum Macdonald
|
@@ -35,32 +35,8 @@ define('WPMS_SMTP_USER', 'username'); // SMTP authentication username, only used
|
|
35 |
define('WPMS_SMTP_PASS', 'password'); // SMTP authentication password, only used if WPMS_SMTP_AUTH is true
|
36 |
*/
|
37 |
|
38 |
-
/**
|
39 |
-
* CHANGELOG
|
40 |
-
*
|
41 |
-
* 0.8.6 - The Settings link really does work this time, promise. Apologies for the unnecessary updates.
|
42 |
-
* 0.8.5 - Bugfix, the settings link on the Plugin page was broken by 0.8.4.
|
43 |
-
* 0.8.4 - Minor bugfix, remove use of esc_html() to improve backwards compatibility. Removed second options page menu props ovidiu.
|
44 |
-
* 0.8.3 - Bugfix, return WPMS_MAIL_FROM_NAME, props nacin. Add Settings link, props MikeChallis.
|
45 |
-
* 0.8.2 - Bugfix, call phpmailer_init_smtp() correctly, props Sinklar.
|
46 |
-
* 0.8.1 - Internationalisation improvements.
|
47 |
-
* 0.8 - Added port, SSL/TLS, option whitelisting, validate_email(), and constant options.
|
48 |
-
* 0.7 - Added checks to only override the default from name / email
|
49 |
-
* 0.6 - Added additional SMTP debugging output
|
50 |
-
* 0.5.2 - Fixed a pre 2.3 bug to do with mail from
|
51 |
-
* 0.5.1 - Added a check to display a warning on versions prior to 2.3
|
52 |
-
* 0.5.0 - Upgraded to match 2.3 filters which add a second filter for from name
|
53 |
-
* 0.4.2 - Fixed a bug in 0.4.1 and added more debugging output
|
54 |
-
* 0.4.1 - Added $phpmailer->ErroInfo to the test mail output
|
55 |
-
* 0.4 - Added the test email feature and cleaned up some other bits and pieces
|
56 |
-
* 0.3.2 - Changed to use register_activation_hook for greater compatability
|
57 |
-
* 0.3.1 - Added readme for WP-Plugins.org compatability
|
58 |
-
* 0.3 - Various bugfixes and added From options
|
59 |
-
* 0.2 - Reworked approach as suggested by westi, added options page
|
60 |
-
* 0.1 - Initial approach, copying the wp_mail function and replacing it
|
61 |
-
*/
|
62 |
-
|
63 |
// Array of options and their default values
|
|
|
64 |
$wpms_options = array (
|
65 |
'mail_from' => '',
|
66 |
'mail_from_name' => '',
|
@@ -216,10 +192,8 @@ function wp_mail_smtp_options_page() {
|
|
216 |
<div id="message" class="updated fade"><p><strong><?php _e('Test Message Sent', 'wp_mail_smtp'); ?></strong></p>
|
217 |
<p><?php _e('The result was:', 'wp_mail_smtp'); ?></p>
|
218 |
<pre><?php var_dump($result); ?></pre>
|
219 |
-
<?php if ($result != true) { ?>
|
220 |
<p><?php _e('The full debugging output is shown below:', 'wp_mail_smtp'); ?></p>
|
221 |
<pre><?php var_dump($phpmailer); ?></pre>
|
222 |
-
<?php } ?>
|
223 |
<p><?php _e('The SMTP debugging output is shown below:', 'wp_mail_smtp'); ?></p>
|
224 |
<pre><?php echo $smtp_debug ?></pre>
|
225 |
</div>
|
@@ -232,14 +206,14 @@ function wp_mail_smtp_options_page() {
|
|
232 |
<h2><?php _e('Advanced Email Options', 'wp_mail_smtp'); ?></h2>
|
233 |
<form method="post" action="options.php">
|
234 |
<?php wp_nonce_field('email-options'); ?>
|
235 |
-
<p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options »', 'wp_mail_smtp'); ?>"
|
236 |
<fieldset class="options">
|
237 |
<legend><?php _e('From', 'wp_mail_smtp'); ?></legend>
|
238 |
<table class="optiontable">
|
239 |
<tr valign="top">
|
240 |
<th scope="row"><?php _e('From Email:', 'wp_mail_smtp'); ?> </th>
|
241 |
<td><p><input name="mail_from" type="text" id="mail_from" value="<?php print(get_option('mail_from')); ?>" size="40" class="code" /><br />
|
242 |
-
<?php _e('You can specify the email address that emails should be sent from. If you leave this blank, the
|
243 |
</tr>
|
244 |
<tr valign="top">
|
245 |
<th scope="row"><?php _e('From Name:', 'wp_mail_smtp'); ?> </th>
|
@@ -403,6 +377,17 @@ function wp_mail_smtp_mail_from ($orig) {
|
|
403 |
} // End of wp_mail_smtp_mail_from() function definition
|
404 |
endif;
|
405 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
406 |
|
407 |
/**
|
408 |
* This function sets the from name value
|
@@ -451,6 +436,7 @@ if (!defined('WPMS_ON') || !WPMS_ON) {
|
|
451 |
|
452 |
// Add filters to replace the mail from name and emailaddress
|
453 |
add_filter('wp_mail_from','wp_mail_smtp_mail_from');
|
|
|
454 |
add_filter('wp_mail_from_name','wp_mail_smtp_mail_from_name');
|
455 |
|
456 |
load_plugin_textdomain('wp_mail_smtp', false, dirname(plugin_basename(__FILE__)) . '/langs');
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: WP-Mail-SMTP
|
4 |
+
Version: 0.8.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 the settings.
|
7 |
Author: Callum Macdonald
|
35 |
define('WPMS_SMTP_PASS', 'password'); // SMTP authentication password, only used if WPMS_SMTP_AUTH is true
|
36 |
*/
|
37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
// Array of options and their default values
|
39 |
+
global $wpms_options; // This is horrible, should be cleaned up at some point
|
40 |
$wpms_options = array (
|
41 |
'mail_from' => '',
|
42 |
'mail_from_name' => '',
|
192 |
<div id="message" class="updated fade"><p><strong><?php _e('Test Message Sent', 'wp_mail_smtp'); ?></strong></p>
|
193 |
<p><?php _e('The result was:', 'wp_mail_smtp'); ?></p>
|
194 |
<pre><?php var_dump($result); ?></pre>
|
|
|
195 |
<p><?php _e('The full debugging output is shown below:', 'wp_mail_smtp'); ?></p>
|
196 |
<pre><?php var_dump($phpmailer); ?></pre>
|
|
|
197 |
<p><?php _e('The SMTP debugging output is shown below:', 'wp_mail_smtp'); ?></p>
|
198 |
<pre><?php echo $smtp_debug ?></pre>
|
199 |
</div>
|
206 |
<h2><?php _e('Advanced Email Options', 'wp_mail_smtp'); ?></h2>
|
207 |
<form method="post" action="options.php">
|
208 |
<?php wp_nonce_field('email-options'); ?>
|
209 |
+
<p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options »', 'wp_mail_smtp'); ?>" /></p>
|
210 |
<fieldset class="options">
|
211 |
<legend><?php _e('From', 'wp_mail_smtp'); ?></legend>
|
212 |
<table class="optiontable">
|
213 |
<tr valign="top">
|
214 |
<th scope="row"><?php _e('From Email:', 'wp_mail_smtp'); ?> </th>
|
215 |
<td><p><input name="mail_from" type="text" id="mail_from" value="<?php print(get_option('mail_from')); ?>" size="40" class="code" /><br />
|
216 |
+
<?php _e('You can specify the email address that emails should be sent from. If you leave this blank, the default email will be used.', 'wp_mail_smtp'); if(get_option('db_version') < 6124) { print('<br /><span style="color: red;">'); _e('<strong>Please Note:</strong> You appear to be using a version of WordPress prior to 2.3. Please ignore the From Name field and instead enter Name<email@domain.com> in this field.', 'wp_mail_smtp'); print('</span>'); } ?></p></td>
|
217 |
</tr>
|
218 |
<tr valign="top">
|
219 |
<th scope="row"><?php _e('From Name:', 'wp_mail_smtp'); ?> </th>
|
377 |
} // End of wp_mail_smtp_mail_from() function definition
|
378 |
endif;
|
379 |
|
380 |
+
/**
|
381 |
+
* This function grabs the from email value and sets it as Sender
|
382 |
+
*/
|
383 |
+
if (!function_exists('wp_mail_smtp_set_sender')) :
|
384 |
+
function wp_mail_smtp_set_sender($from_email) {
|
385 |
+
global $phpmailer;
|
386 |
+
$phpmailer->Sender = $from_email;
|
387 |
+
return $from_email;
|
388 |
+
}
|
389 |
+
endif;
|
390 |
+
|
391 |
|
392 |
/**
|
393 |
* This function sets the from name value
|
436 |
|
437 |
// Add filters to replace the mail from name and emailaddress
|
438 |
add_filter('wp_mail_from','wp_mail_smtp_mail_from');
|
439 |
+
add_filter('wp_mail_from','wp_mail_smtp_set_sender', 99);
|
440 |
add_filter('wp_mail_from_name','wp_mail_smtp_mail_from_name');
|
441 |
|
442 |
load_plugin_textdomain('wp_mail_smtp', false, dirname(plugin_basename(__FILE__)) . '/langs');
|