reading emails using POP3/SMTP adapter and segregate the same in db.

Home Page Forums BizTalk 2004 – BizTalk 2010 reading emails using POP3/SMTP adapter and segregate the same in db.

Viewing 1 reply thread
  • Author
    Posts
    • #24705

      I have  a following requirement in my project:

      Poll preconfigured Email boxes and extract the email from it. Segregate the same in the db based on the following parameters:

      ·         From Address

      ·         Subject Line

      ·         Attached file naming convention

      Pls someone guide me as how can I achieve this using Biztalk Server 2006.

      Also please point me to a working example for then same.
      That is to read a mail from mail box and then updating the DB(Microsoft SQL Server).

    • #24738

      Basically you need to set up a receive port with one POP3 receive location for each mailbox. Point these at your mail server using appropriate authentication and mail box id. Set the polling interval.

      The POP3 adapter will deliver a message to BizTalk with a number of properties in the message context. http://msdn.microsoft.com/en-us/library/aa560937(BTS.20).aspx

      If the message has no attachments you will receive a message with a single part which is the email body. If the email has attachments you will receive a message with the first part being the email body and each subsequent part being one of the attachments.

      You need to decide on the format of your SQL table/s and how you will store this info and also creating a stored procedure to insert the data . Then create a schema from this stored procedure.

      In an orchestration receive the POP3 message, make this message a .Net message of type System.Xml.Document ( this is BizTalk’s untyped message) .

      Create a new SQL message using data from the message and properties from the context and send to a SQL port.

      There is a sample POP3 application here that show how to manipulate messages with a variable number of attachments.
      http://www.biztalkgurus.com/media/p/15562.aspx

       

       

       

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.