3 Replies Latest reply on Dec 21, 2010 1:14 PM by lovewebdev

    Send Email from any email client directly to my database

    lovewebdev Level 1

      How is it that someone sends an email from an email client and then that email can be saved to a database.

       

      I realize I can use CFPOP to load the emails and then use CFquery to store it but that's all manual.

       

       

      Can I get it to happen once the email comes in?

       

       

      Also is it possible to create pop accounts using Coldfusion?

       

       

      Thanks!

        • 1. Re: Send Email from any email client directly to my database
          ilssac Level 5

          ColdFusion IS NOT a mail server.  It is really only a mail client using the POP and SMTP protocols to receive and send messages to a mail server just like any other client; i.e. Outlook, Thunderbird, etc.

           

          Only the mail server know when the email comes in.  If you want something to be triggered by that event, it will need to be triggered from the mail server.  Fully featured mail servers sometimes have the ability to take actions like this.  But you will need to dig into your mail server documentation to find out.

           

          But, it is pretty rare that one needs to fire off an event AS SOON AS an email arives.  Most people are happy just setting up a scheduled task to fire off every x minutes (1,10,15, whatever works) to see if there are any new messages.  That is very easy to automate with ColdFusion.

           

          P.S. The latest version of ColdFusion can now also communicate with Exchange servers in it's native protocol.  But ColdFusion is still just a client in that relationship.

          • 2. Re: Send Email from any email client directly to my database
            Dan Bracuk Level 5

            In addition to what Ilssac said, you may want to examine the contents of the email before storing it.  It might contain something nefarious.

            • 3. Re: Send Email from any email client directly to my database
              lovewebdev Level 1

              I see. I guess something I'm gonna have to look into. Thanks!