Gruzin Posted March 5, 2007 Share Posted March 5, 2007 Hi guys, Is there a way to recieve a report whether e-mail is sent or not using php? Thanks, George Quote Link to comment https://forums.phpfreaks.com/topic/41264-e-mail-status-report-with-php/ Share on other sites More sharing options...
benjaminbeazy Posted March 5, 2007 Share Posted March 5, 2007 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"; } Quote Link to comment https://forums.phpfreaks.com/topic/41264-e-mail-status-report-with-php/#findComment-199930 Share on other sites More sharing options...
Gruzin Posted March 5, 2007 Author Share Posted March 5, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/41264-e-mail-status-report-with-php/#findComment-199944 Share on other sites More sharing options...
benjaminbeazy Posted March 5, 2007 Share Posted March 5, 2007 what do you mean by email is sent or not, an email being sent by the server, by the user, please clarify and explain situation Quote Link to comment https://forums.phpfreaks.com/topic/41264-e-mail-status-report-with-php/#findComment-199946 Share on other sites More sharing options...
Gruzin Posted March 5, 2007 Author Share Posted March 5, 2007 OK, Say I've sent an email to: someone@someone.com, 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 someone@someone.com or something like this, just like yahoo or outlook does. Is it possible? Quote Link to comment https://forums.phpfreaks.com/topic/41264-e-mail-status-report-with-php/#findComment-199950 Share on other sites More sharing options...
Gruzin Posted March 5, 2007 Author Share Posted March 5, 2007 *Bump* Quote Link to comment https://forums.phpfreaks.com/topic/41264-e-mail-status-report-with-php/#findComment-199991 Share on other sites More sharing options...
kenrbnsn Posted March 5, 2007 Share Posted March 5, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/41264-e-mail-status-report-with-php/#findComment-200008 Share on other sites More sharing options...
Gruzin Posted March 5, 2007 Author Share Posted March 5, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/41264-e-mail-status-report-with-php/#findComment-200011 Share on other sites More sharing options...
redarrow Posted March 5, 2007 Share Posted March 5, 2007 you can if you set up your own mail server but it all takes time and study sorry. Quote Link to comment https://forums.phpfreaks.com/topic/41264-e-mail-status-report-with-php/#findComment-200020 Share on other sites More sharing options...
Gruzin Posted March 5, 2007 Author Share Posted March 5, 2007 you can if you set up your own mail server but it all takes time and study sorry. Ok, thanks mate for that info, Think I have to speak with server admin... Quote Link to comment https://forums.phpfreaks.com/topic/41264-e-mail-status-report-with-php/#findComment-200025 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.