phpmailer Mail not Deliver Error Message in Log?
Is it possible to set the phpmailer to have a error log message when the mail is undeliverable? I am not talking about mailer error. I wanted to know if the message is delivered without setting the reply to. Is it possible?
I don't know the specific abilities of phpmailer, but the php built-in 'mail' function certainly can't do it. It can tell you if the call failed, perhaps because of faulty parms or a failure in the smtp link from the php instance. It can't however tell you if the mail was actually delivered since the only feedback would be a bounceback from the receipient's post office which your script is not in a position to handle, is it? You could perhaps use a reply-to that is pointed to a script that monitors your sent messages that could 'try' and recognize a reply indicating failure and then post to an error log. You could also use this technique to recognize a read-receipt from the recipient if they have that feature enabled. That is about all I could imagine doing. There are so many ways for the mail to "not" be delivered that no function could possibly assure you of success. The current state of email does not provide this kind of thing in it's required protocol. Would that it did because it could perhaps be used to curb the overwhelming use of email for spam and other misfeasance of email.
PS - If you're posting here you should be using:
error_reporting(E_ALL | E_NOTICE);
at the top of ALL php code while you develop it!
Mailer error log? Not sure what you mean by that.
Your email even if it is sent can fail seconds, minutes, hours, days later.
Depending on the sophistication of your CPanel email settings for your mail boxes, it is possible to set up filters to deal with bounced and undelivered emails.
As for your other question...
You will always need the Reply-to value set.
In your server create a no-reply@ email address and set that mail box to expire / delete any incoming emails. It is handy to set a default reply message stating that the person has responded to a no reply email address and that they need to go to the website contact point or give an email address they can email.
Yes, I know I'm about as subtle as being hit by a bus..(\\.\ Aug08)
Yep... I say it like I see it, even if it is like a baseball bat in the nutz... (\\.\ Aug08)
I want to leave this world the same way I came into it, Screaming, Incontinent & No memory!
I laughed that hard I burst my colostomy bag... (\\.\ May03)
Life for some is like a car accident... Mine is like a motorway pile up...
Problems with Vista? :: Getting Cryptic wid it. :: The 'C' word! :: Whois?
Users Browsing this Thread
There are currently 2 users browsing this thread. (0 members and 2 guests)