5 Replies Latest reply on Jul 9, 2008 8:39 PM by fxdinh

    Email handling

    fxdinh
      Hi everyone,
      I'm trying to working with email in coldfusion. My problem that I want to know whether my email sent successfully or not?
      Anyone can give me a solution.
      Many thanks.
        • 1. Re: Email handling
          dongzky Level 1
          you mean like the mailer-daemon thing? or you want a value to be returned in cf the sending success status as true or false?
          • 2. Re: Email handling
            Dan Bracuk Level 5
            Do you have a mailsent log file?
            • 3. Re: Email handling
              fxdinh Level 1
              Yes, dongzky, you're right. I still not solve my problem.
              • 4. Email handling
                dongzky Level 1
                which one is right? the mailer daemon thing? if you want this, then I think all you need to do is set the failto parameter of your cfmail tag with the email you want the failure notification to be sent to.

                but if you want your cf app to give you the true or false value, then maybe you should have a mailsent log file mentioned by Dan and make some checkings on that file. you can enable this log in the cf admin under Mail in the server settings. Once enabled, if you're using cf8, the log is usually created/updated in \your_cf8root\ColdFusion8\logs\mailsent.txt every cfmail. There, you can let cf(maybe try doing some cffile) read and parse the file and do some checkings in order for your cf app to determine if the mail has been succesfully sent or not.
                • 5. Re: Email handling
                  fxdinh Level 1
                  dongzky, thank you very much. I will try it.