MSMTP and PHP mail function fails with Apache

the mail() function

Moderators: egami, macek, gesf

Post Reply
johnj
php-forum Super User
php-forum Super User
Posts: 1803
Joined: Thu Mar 10, 2011 5:07 pm

Wed Jun 05, 2013 8:43 pm

use this, $error = error_get_last(); echo $error; before the echo in the else part and see if there is any hidden errors.

Also, switch on error reporting at the top of your script.

And, then print $from, $to, $message and check if they are error free.

johnj
php-forum Super User
php-forum Super User
Posts: 1803
Joined: Thu Mar 10, 2011 5:07 pm

Tue Jun 25, 2013 9:48 pm

What is this function mail()? Also - do print_r($error);

Post Reply