mail() function help!

This is a discussion on mail() function help! within the PHP Language forums, part of the PHP Programming Forums category; Can someone help me with the mail() function??? The below is just to get myself going but I can't ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-27-2007
Abersparky
 
Posts: n/a
Default mail() function help!

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
right?

sendmail_from
me@localhost.com

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

My code is as follows:

mail ('abersparky@gmail.com', 'New Comment Submitted for Approval',
'Approval informational');

THANKS!!!

Reply With Quote
  #2 (permalink)  
Old 03-27-2007
Geoff Muldoon
 
Posts: n/a
Default Re: mail() function help!

abersparky@gmail.com says...
> Can someone help me with the mail() function???


> My code is as follows:
>
> mail ('abersparky@gmail.com', 'New Comment Submitted for Approval',
> 'Approval informational');


Try:
$to = 'abersparky@gmail.com';
$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>';

See:
http://au.php.net/manual/en/function.mail.php
and search for specific gmail issues.

GM
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 05:49 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0