Like my plugin? Got 30 seconds to help me out? Would love your feedback on WordPress, click here to answer my 3 question survey.
This plugin reconfigures the wp_mail() function to use SMTP instead of mail() and creates an options page that allows you to specify various options.
You can set the following options:
- Specify the from name and email address for outgoing email.
- Choose to send mail by SMTP or PHP’s mail() function.
- Specify an SMTP host (defaults to localhost).
- Specify an SMTP port (defaults to 25).
- Choose SSL / TLS encryption (not the same as STARTTLS).
- Choose to use SMTP authentication or not (defaults to not).
- Specify an SMTP username and password.
The plugin includes integrated support for Pepipost.
- Upload to your
- Activate the plugin through the ‘Plugins’ menu in WordPress.
- My plugin still sends mail via the mail() function
If other plugins you’re using are not coded to use the wp_mail() function but instead call PHP’s mail() function directly, they will bypass the settings of this plugin. Normally, you can edit the other plugins and simply replace the
wp_mail((just adding wp_ in front) and this will work. I’ve tested this on a couple of plugins and it works, but it may not work on all plugins.
- Will this plugin work with WordPress versions less than 2.7?
No. WordPress 2.7 changed the way options were updated, so the options page will only work on 2.7 or later.
- Can I use this plugin to send email via Gmail / Google Apps
Yes. Use these settings:
SMTP Host: smtp.gmail.com
SMTP Port: 465
Username: your full gmail address
Password: your mail password
- Can you add feature x, y or z to the plugin?
Short answer: maybe.
By all means please contact me to discuss features or options you’d like to see added to the plugin. I can’t guarantee to add all of them, but I will consider all sensible requests. I can be contacted here:
So, I’ve setup my hosting within the Google Cloud which restricts outbound email. This was an easy to use work around using SendGrid SMTP. Installed quickly, SMTP options were straight-forward, and everything worked as hoped. Thanks!
Thank you for a great plugin, we recommend it to our clients and customers because it does what it is supposed to and as it is described.
This plugin may store the SMTP password encrypted in the WP Database, but it shows it in plain text within the plugins Settings area for all to see.
If multiple people have access to the WP-Admin area, they have the ability to view the mail accounts password – all in plain text.
If someone gains access to you wp-admin area, they have the ability to see the login information as well – all in plain text.
Thank you! Thank you! Thank you!
This plugin works so well I forgot to save the settings before starting the test!
Also the test mail is forgotten after each test. Not sure if there’s a way to keep that?
Email is such an important aspect of any website and this plugin has handled it seamlessly, without any issues for the past several years. I wouldn’t recommend any other plugin over this one. This is by far the best plugin for sending emails via SMTP.
Contributors & Developers
“WP Mail SMTP” is open source software. The following people have contributed to this plugin.Contributors
“WP Mail SMTP” has been translated into these 13 locales: Japanese, German (Formal), Ukrainian, Russian, Persian, Brazilian Portuguese, Spanish, Swedish, Dutch, Vietnamese, Czech, English (UK), English (Canada). Thank you to the translators for their contributions.
Interested in development?
- Addition of Pepipost and cleanup of admin page.
- Addition of Pepipost and cleanup of admin page.
- Minor security fix, sanitize test email address.
- Minor security fix, hat tip JD Grimes.
- Improvement to the test email function, very low priority update.
- Fixing reported issue with passing by reference. props Adam Conway
- Removing the deprecation notice.
- $phpmailer->language became protected in WP 3.2, no longer unset on debug output.
- Typo in the From email description.
- Removed changelog from plugin file, no need to duplicate it.
- Optionally set $phpmailer->Sender from from email, helps with sendmail / mail().
- Fix for a long standing bug that caused an error during plugin activation.
- The Settings link really does work this time, promise. Apologies for the unnecessary updates.
- Bugfix, the settings link on the Plugin page was broken by 0.8.4.
- Minor bugfix, remove use of esc_html() to improve backwards compatibility.
- Removed second options page menu props ovidiu.
- Bugfix, return WPMS_MAIL_FROM_NAME, props nacin.
- Add Settings link, props Mike Challis https://profiles.wordpress.org/MikeChallis/
- Bugfix, call phpmailer_init_smtp() correctly, props Sinklar.
- Internationalisation improvements.
- Added port, SSL/TLS, option whitelisting, validate_email(), and constant options.
- Added checks to only override the default from name / email
- Added additional SMTP debugging output
- Fixed a pre 2.3 bug to do with mail from
- Added a check to display a warning on versions prior to 2.3
- Upgraded to match 2.3 filters which add a second filter for from name
- Fixed a bug in 0.4.1 and added more debugging output
- Added $phpmailer->ErroInfo to the test mail output
- Added the test email feature and cleaned up some other bits and pieces
- Changed to use register_activation_hook for greater compatability
- Added readme for WP-Plugins.org compatability
- Various bugfixes and added From options
- Reworked approach as suggested by westi, added options page
- Initial approach, copying the wp_mail function and replacing it