Hi guys, would appreciate help on this....have looked in a lot of places but still no success and godaddy does not want to help. Have a new godaddy VPS and need to enable php mail() function for my Wordpress blogs as no email verification emails are being sent. (non of my other websites send mail via php either) error I get when doing wordpress password retrieve: The e-mail could not be sent. Possible reason: your host may have disabled the mail() function... I know I need to change a setting in php.ini file to enable it (or maybe I can do this directly for WHM admin panel?). Can you help?
the 'disable_functions =' is totally empty. Here is a direct cut and past from my php.ini file about [mail function]: [mail function] ; For Win32 only. ;SMTP = localhost ; smtp_port = 25 ; For Win32 only. ;sendmail_from =chris@ceb0.com ; ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). sendmail_path = /usr/sbin/sendmail -t -i ; Is there anything here that needs changing?
Thanks guys... - path to sendmail is correct and sendmail is working (I checked with godaddy support) maxpain - thanks but I am running WP version 2xx and the wp_mail function looks like this: function wp_mail($to, $subject, $message, $headers = '') { if( $headers == '' ) { $headers = "MIME-Version: 1.0\n" . "From: wordpress@" . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME'])) . "\n" . "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\n"; } return @mail($to, $subject, $message, $headers); } You can find my php.ini info here: http://www.vidaguerrasbutt.com/1.php Problem still persists.
Thanks for the suggestion, did this but still the same error: The e-mail could not be sent. Possible reason: your host may have disabled the mail() function...
Try this in shell mail -s "Testing Email from `hostname`" <youremailaddress> Code (markup): It should send you a email from your MTA Then try to send via PHP <? mail("youremail", "Test Subject", "Testing"); ?> Code (markup): Let me know if you still have problems
Hi all. Little late in the day but this may help other sufferers with the same problem. You need to open your php.ini file, scroll down to mail() and replace the value "localhost" with your SMTP Host IP address. 127.0.0.1 does not work, you will need your mailservers IP address. Save the file and try the mail, should be sorted. Usual Setting [mail function] ; For Win32 only. ;SMTP = localhost ; smtp_port = 25 Change to [mail function] ; For Win32 only. ;SMTP = 255.197.00.454(whatever your mailserver IP is) ; smtp_port = 25
I was trying quite hard to get email working with WordPress on GoDaddy. After hours of continuous effort I was able to get it working Have a look at this detailed explanation on the steps I followed to get it to work. http://www.expertcore.org/viewtopic.php?f=74&t=1079
If PHP is running as nobody user make sure “Prevent the user “nobody†from sending out mail to remote addresses (PHP and CGI scripts generally run as nobody if you are not using PHPSuexec and Suexec respectively.)†option is not checked. You can check this option from WHM: - Login to your WHM. - Go to Server Configuration -> Tweak Settings. If you are hosting other websites too then this option should remain On. Turn off this option only if you are going to host your personal websites. Kailash