Email not working

August 14, 2013 5.1k views
Hi, My wordpress sites are working fine, except email is not sent from the Wordpress. Let say i install a contact form plugin. Suppose i will get email everytime anyone contact me from the site, but i get nothing. Whats wrong?
5 Answers
I install sendmail.
Then i try the contact form. Now its worse, the after i click Submit the page keeps loading, until the page is not available.
Do you have an MTA installed?
sudo apt-get install sendmail
"My wordpress sites are working fine, except email is not sent from the Wordpress."

The solution from this thread => WordPress email notifications worked for me.
Do you see any errors?

Add these lines to wp-config.php:

@ini_set('log_errors','Off');

@ini_set('display_errors','On');
@ini_set('error_reporting', E_ALL );
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', false);
define('WP_DEBUG_DISPLAY', true);


and try sending an email -- it should output the error if any.

Make sure you delete the lines you added once you're done.

i did'nt see any errors.but

import smtplib
server = smtplib.SMTP("smtp.gmail.com",587) is not working

Have another answer? Share your knowledge.