iGeek Blog

Jignesh Patel's Blog

categories

recent posts

recent comments



I was facing the issue: Emails were not getting sent after someone add the comment on the post in my wordpress based blog, http://magentocoder.jigneshpatel.co.in/

The problem was not in the Wordpress, it was on the hosting server. on which the blog is hosted.

After posting Ticket regarding the problem, they replied simple php mail() function won't work on that. As they are having the security concerns. After requesting them, they provide me the sample php code, which can send the email.

Here are the steps to be followed if you want to fix the email not sending problem (it will work if your problem is similar to mine).

1. Download the 'class-phpmailer.php' from here
2. Replace it with the existing file inside the wp-includes directory. (Make sure you have taken the backup of older one)
3. Then open the file 'pluggable.php' from 'wp-includes' directory
Find the line
$phpmailer->IsMail();

Replace it with
$phpmailer->IsSMTP();

You may need to setup the email account on the hosting server. Like 'wordpress@hostname.com'

I did up to these much changes & emails started to be sent successfully.