After much playing around with the internals of wordpress to get some workable SMTP settings to send wordpress mails to my google apps setup and trying several plugins to help do the same, I am pleased to say I finally found one that does the trick.
Whats the problem?, well essentially once you elect to have Google Apps handle email for your domain(s) and you update the mx records to route email through Google Apps instead of your local mail server, the phpmail function within wordpress can start to fail.
Mail notifications such as new users, new comments etc all fail because the from address in my case was being malformed by wordpress so by the time it reached Google Apps it was rejected due to format.
The solution?, send by a defined SMTP server rather than let phpmail do it’s thing, below you will find the link to the plugin that’s completely self explanatory, just install it and it will fix the problem. Other extensions I tried required me to still play around with other parts of PHP that I didnt think was necessary just to send wordpress emails, fortunately this plugin has everything it needs contained within.
http://www.marcocimmino.net/cimy-wordpress-plugins/cimy-swift-smtp/
The only other thing I had to do was uncommentthe openSSL module in php.ini so PHP was able to use TLS to send as required by gmail.
Find the file called php.ini on your server (you may have more than one so just do them all to be sure)
Change
;extension=php_openssl.dll
To
extension=php_openssl.dll
This was bugging me for ages, hopefully this definitive fix will help you out along with my other bugfixes mentioned on this blog.
Wordpress related links:
comment on announcing wordpress 1.5 by ryan markel » wordpress 1.5 … – [...] announced here, the final version of wordpress 1.5 has been [...]
start a wordpress blog on your own site – part 1: finding the … – so you know a little about designing websites and you know a thing or two about blogging. now you want to start blogging on your own website, or convert your old site into a blog. everyone else seems to be doing it, so it can’t be that …
WordPress Plugin: “Disable wptexturize” : Utter Ramblings – “Disable wptexturize” is the second plugin I’ve created for WordPress. To be honest, as far as plugins go, they don’t get much simpler than this one. Aside from the header info, it consists of a grand total of three lines of code.
wordpress on debian linux – this tutorial is how to install wordpress on debian linux. installing wordpress on debian? what for? are there many easy ways to install wordpress on our server (web hosting)? eventually, we don’t need to know what distro that our …
Web Design – Download: Fusion Wordpress theme. – Articles on Graphic Design, Web Development, HTML margin:0px !important;” />. It works (as far as i’ve tested) on all current and last generation browsers (yes even Internet Explorer 6!). Feel free to modify it anyway you see fit.
Tags: apps, blog, dll, domain, Domains, email, Fix, gmail, google, google apps, ini, internals, local mail, mail notifications, mail server, mx records, php, servers, smtp server, smtp settings, swift, Wordpress
9 Comments Wordpress mail bug with Google Apps
Yuva
June 9th, 2009 at 12:25 pm
1Thanks for the link, it fixed my bug and made my life easy actually.
rasim
June 12th, 2009 at 6:05 pm
2That link helped me too thanks.
web design leeds
June 22nd, 2009 at 11:07 am
3thanks, this bug was driving me crazy.
Pip
June 28th, 2009 at 11:45 am
4The mail bug was giving me head spin and now i have rolled it off.Thanks.
Joelchrist
July 1st, 2009 at 7:04 am
5Thank you so much .. I found all my bugs. Really nice link.
JP
August 24th, 2009 at 8:12 pm
6I was having the same problem and was happy to find your post. However, when I send a test email with this plugin I’m getting this error:
Warning: require_once(Swift/php5/lib/Swift.php) [function.require-once]: failed to open stream: No such file or directory in /wp-content/plugins/Cimy_Swift_SMTP/swift_engine.php on line 26
Did you have this problem?
Brad
August 25th, 2009 at 9:46 am
7@JP Your PHP installation needs to have swiftmailer installed / uncommented, you can get it from here if you don’t have it http://swiftmailer.org/, most likely the php config file has it commented out although mine worked straight away. Your machine may also have more than one PHP installation so be sure to tweak the live one :)
JP
August 25th, 2009 at 5:03 pm
8Brad, thanks for the help!
I’m pretty new to this, so I apologize for my ignorance. However, what php config file are you referring to?
Thanks
Brad
August 25th, 2009 at 5:15 pm
9You might get the answer from here http://www.hardcoder.com/scripting/php/config.php, failing that something like this would be a useful start.
RSS feed for comments on this post · TrackBack URI
Add your comment here!
You must be logged in to post a comment.