Jump to content

E-mail status report with php


Gruzin

Recommended Posts

to see if the function did what it was told to do use mail()

 

http://us3.php.net/manual/en/ref.mail.php

 

if(mail(YOUR OPTIONS)){

echo "mail worked";

}else{

echo "mail didn't work";

}

 

Thank you very much, but I meant to "recieve a report whether e-mail is sent or not"....

 

Thanks for any info,

George

OK,

 

Say I've sent an email to: [email protected], php will tell me that e-mail is sent, but I want to make sure that it is. I mean when I send the mail, I want to recieve a report, like this: failed to send e-mail to [email protected] or something like this, just like yahoo or outlook does. Is it possible?

The problem here is that the PHP mail() function does not send the mail itself (usually), it hands the data off to the system mail program which then sends the mail. If the hand-off works, your script gets a "success" return, if it doesn't work, you get the failure. If you want to know whether the email was actually sent you need someway of communicating with the program that actually sends the email.

 

Ken

The problem here is that the PHP mail() function does not send the mail itself (usually), it hands the data off to the system mail program which then sends the mail. If the hand-off works, your script gets a "success" return, if it doesn't work, you get the failure. If you want to know whether the email was actually sent you need someway of communicating with the program that actually sends the email.

 

Ken

 

 

Thanks Ken,

 

That's what I thought, how can I communicate with the program that actally sends the mail?

 

Regards,

George

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.