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:
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.
[CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]
If you can't think outside the box, you will be trapped forever with no escape...
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)