mail() function help!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Abersparky

    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.co m

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

    My code is as follows:

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

    THANKS!!!

  • Geoff Muldoon

    #2
    Re: mail() function help!

    abersparky@gmai l.com says...
    Can someone help me with the mail() function???
    My code is as follows:
    >
    mail ('abersparky@gm ail.com', 'New Comment Submitted for Approval',
    'Approval informational') ;
    Try:
    $to = 'abersparky@gma il.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:

    and search for specific gmail issues.

    GM

    Comment

    Working...