Results 1 to 3 of 3

Thread: phpmailer Mail not Deliver Error Message in Log?

  1. #1
    Join Date
    Dec 2008

    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?

  2. #2
    Join Date
    Jul 2013
    Voorheesville NY USA
    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:

    ini_set('display_errors', '1');

    at the top of ALL php code while you develop it!

  3. #3
    Join Date
    Mar 2007
    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.
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center