/    Sign up×
Community /Pin to ProfileBookmark

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?

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@ginerjmJul 09.2014 — 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.
Copy linkTweet thisAlerts:
@rootJul 10.2014 — 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.
×

Success!

Help @phpnewbie08 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.7,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...