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: