Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mail operation

Status
Not open for further replies.

jbl4me

MIS
Aug 19, 2003
67
US
I am using zencart. I cant seem to get the mail to send properly. How can I tell if PHP is properly connecting to sendmail?
 
Code:
mail("me@mysite.domain","test email","testing email connection");

Bastien

Cat, the other other white meat
 
Update:

I have tested sendmail, and it works, so I it must be PHP.
I then made a "mail.php" like

<?

mail("me@mysite.domain","test email","testing email connection");

?>

Of course replacing the email addy with my own. I then ran the php file. I got an error in the SENDMAIL logs about incorrect data format? So sendmail defantly picks up the mail, just has that error.

Thanks
Will
 
you could do something like this to check if the mail has sent:

Code:
<?php

$themail = mail("to","sub","mess");

if($themail){
    echo "Successfully sent mail";
}else{
    echo "Error in sending mail";
}

?>

Regards,

Martin

Gaming Help And Info:
[URL unfurl="true"]http://gaming.webrevolt.biz[/URL]
 
Thanks to all for replys, the problem was in my hosts file, in that it was telling my ISPs relay it was "localhost.localdomain" and so the relay was being rejected.

Thanks
Will
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top