3 Replies Latest reply: Oct 23, 2013 8:35 PM by charlie@carehart.org RSS

    Undelivered E-mail Notification

    Phinehas1234 Community Member

      We find that there are some undelivered e-mail stored in server. However, we did not receive any notification e-mail for these undelivered e-mail.

       

      To ensure all e-mail should be sent out, is there any setting for coldfusion to notify admin if there are any undelivered e-mails existed?

        • 1. Re: Undelivered E-mail Notification
          charlie@carehart.org CommunityMVP

          Phinehas, first, it will help to be clear on what undelivered email is about. It’s not email that couldn’t be delivered because the “to” address could not be reached. Any such rejections of that WOULD be emailed back to the sender (the from address, or the reply-to or fail-to address if one of those was specified as different from the from address).

           

          Undelivered email (mail that ends up in the undelivr folder of CF) ends up there only if the MAIL SERVER that CF it told to talk to (in the CF Admin mail page, or in the CFMAIL  SERVER attribute) cannot be reached, when CF tries to move the email out of the spool folder (a sibling to the undelivr folder).

           

          As such, you say you want an email notifying you, but that can’t happen: if CF can’t send email to intended CFMAIL recipients because the mail server is not reachable, then there simply is no way (currently) for such a failure email to be sent to you. Of course, it could be possible for Adobe to add some sort of alternative mail server to be used just for that, but there’s no current such setting.

           

          Someone may point out that the Enterprise editions of CF now have an option for a secondary mail server to be specified, but that’s so that CF tries one then another. That at least might help avoid the problem you are raising, by reducing the chance of a mail server not being reachable from CF, but it’s not really a way to get the notification you seek.

           

          Hope that’s helpful.

           

          /charlie

          • 2. Re: Undelivered E-mail Notification
            Phinehas1234 Community Member

            The mail log record "Connection time out". It cannot connect to mail server sometimes.

             

            I find there is an item "Backup Mail Servers" in ColdFusion Administrator page. When will ColdFusion use backup mail server to send e-mail? Will only use when default server is unavailable (defualt server connection timeout)?

            • 3. Re: Undelivered E-mail Notification
              charlie@carehart.org CommunityMVP

              @Phinehas, as far as I know that is how it should work, yes.

               

              As I noted above, though, that can’t be relied upon to tell you if messages end up in the undelivered folder. Those would only happen if the primary AND backup mail servers could not be reached. Again, bottom line: there is currently no way (built-in) that you could get notified of messages ending up in undelivered.

               

              Do note that there is a new feature (in CF9 and above, I believe) where the “view undelivered email” button on the CF admin mail page offers an option for you to respool email that has ended up in undelivered, so that CF will try to deliver the email again). So at least it’s not that there’s “nothing you can do” about undelivered email.

               

              One last thought: there is an “out of the box” potential solution for you. I said there’s no built-in way to be notified of messages ending up in undelivered. But there is a feature in CF (since CF7) that could be used to solve this. Look at the event gateway feature (another page in the CF Admin) and read the docs (CF Admin manual) about using the directorywatcher gateway. You could configure a CFC (that would be connected to the gateway) to watch that specific directory, and a method would be fired in the CFC when a file is added to that folder. You could have that CFC method send you an email. Just google:

               

              ColdFusion directory watcher

               

              For more on that (or again, see the docs). Hope that helps.

               

               

               

              /charlie