mail() function help!

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Can someone help me with the mail() function???
The below is just to get myself going but I can't seem to get it
working... is there something else I should be doing?  I checked
phpinfo() and the sendmail values are below.  Those mean it's turn on


 /usr/sbin/sendmail -t -i  /usr/sbin/sendmail -t -i

My code is as follows:

mail ('', 'New Comment Submitted for Approval',
'Approval informational');


Re: mail() function help! says...
Quoted text here. Click to load it

$to = '';
$subject = 'New Comment Submitted for Approval';
$message = 'Approval informational';
$headers = '';
$params = '';

if(mail($to, $subject, $message, $headers, $params)) {
    echo 'No problem in mail function';
} else {
    echo 'Oops, mail function problem';

If it is not a mail function problem it may be that gmail is filtering it  
out as possible spam.  Try:

$params = '-f<insert a known real sender email address here>';

and search for specific gmail issues.


Site Timeline