TIGblogs TIG | TIGblogs GROUP TIGBLOGS LOGIN SIGNUP
betzster's Blog
betzster's Blog
Problems Getting WordPress Emails

Are you having problems getting email sent from you WordPress blog?

One of the features that I really like is being able to get emails when new comments are posted. I also use the Contact Form 7 plugin which needs to send mail.

The Problem

I recently switched web hosts to Webfaction. They’ve been great — what I think you should be able to expect out of shared hosting.  The only problem is that they don’t support PHP’s mail function. They claim it’s to reduce spam — mail() can be used to send email defining the from address as whatever you want without having to authenticate. It can be very convenient, but it’s really not the ideal way to send mail using PHP anyway. WordPress does it because it’s pretty rare to find a server that doesn’t support it and the alternatives are too commonly uninstalled.

The Solution

To fix this issue we need to find a way to take the email that WordPress wants to send and send them through Pear’s mail function. Pear is a PHP framework much like zend is to PHP or jQuery is to Javascript. The mail function in particular lets us send mail similar to the way the regular mail function does, but we have to authenticate through an SMTP server.

I found a couple of plugins, but decided to use WP-Mail-SMTP.

Since we need to authenticate, there has to be a real email address that the emails are coming from. I setup wordpress [at] mydomain because that’s where the emails would normally come from if you didn’t have this issue. Since I’m using Google Apps for my email I used the author’s instructions for configuring the plugin for Google Apps and it worked perfectly:

Mailer: SMTP
SMTP Host: smtp.gmail.com
SMTP Port: 465
Encryption: SSL
Authentication: Yes
Username: your full gmail address
Password: your mail password

Hopefully this helps. I’m sure there could be other causes to why your  mail isn’t sending, but this is what worked for me. Before you try this, try checking if your host supports PHP’s mail function. If not, this will probably fix it — as long as they support Pear. If they don’t support PHP’s mail function, they most likely support Pear for the same reasons listed here.


January 12, 2010 | 12:01 PM Comments  0 comments

Tags:
You must be logged in to add tags.


Josh's Profile


Latest Posts
Network Favicons
Set up VirtualBox for...
Facebook Hackathon...
On Comments
WordPress &...

Monthly Archive
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
March 2008
April 2008
May 2008
June 2008
July 2008
September 2008
October 2008
November 2008
December 2008
January 2009
February 2009
March 2009
April 2009
May 2009
June 2009
July 2009
August 2009
September 2009
October 2009
November 2009
December 2009
January 2010
February 2010
March 2010
April 2010
June 2010
July 2010
August 2010
September 2010
October 2010
November 2010
December 2010
January 2011
February 2011
March 2011
April 2011
June 2011
September 2011
October 2011
November 2011
December 2011
January 2012

Change Language


Tags Archive
apache asides band blog blogs coding design dreamweaver florida gallery general globalwarming hosting johnmayer network nifty php plugins politics prom publications school tech themes twitter vacation web windows wordpress youtube

Links
High School Reunion
Josh Betz Blog
Josh Betz Professional
Josh Betz Projects


27719 views
Important Disclaimer