none
How to Read Body of Email using POP3 Adapter Biztalk Server 2006 RRS feed

  • Question

  • Hi All.
    I am working on Biztalk Application where i need to read emails using POP3 Adapter at receive port then i want to read the body of the Email ..and again send email to different email id.
    I need to include the Body to the second email...
    I am able to read subject line,To line From line ...but i am not able to read Body of Email..
    If anyone guide how can i read body of email...

    Thanks
    Sandeep
    Saturday, March 21, 2009 7:30 AM

Answers

All replies

  • Stephen Thomas has a good pre-built solution for retrieving email messages from a POP3 receive port found here: http://www.biztalkgurus.com/blogs/biztalk/archive/2006/08/08/How-to-Split-Received-Email-Attachments-in-BizTalk-2006.aspx. He has a sample you can use as a starting point.

    The message will come in as a multi-part message and the message body is usually in the first part - msgPart[0]

    Thanks,
    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Saturday, March 21, 2009 10:39 PM
    Moderator
  • Hi Ben..
    Thanks for your reply...
    I tried using your sugesstion but i am having problem..
    So i tried like this...first i have one variable(Var1) of type System.String then i wrote
    Var1 = Message_in.Message_body.text;

    then i read this variable value in Xml element by writing ..

    Message_Out.Body = Var1;
    this way i can get the text but..the problem is that in body of email there is one table and two hyperlinks..
    So my concern is when i read the body of message to a String Variable will the format of body will remain intact and the hyperlink will be active if i again resend this email to another person using Biztalk..

    Thanks
    Sandeep
    Tuesday, March 24, 2009 11:23 AM
  • The difficulty in answering this is that it varies. Usually the body will stay intact unless the content/type of the email message is something other than what BizTalk expects. It is also possible to structure an email in such a way that Biztalk cannot process it successfully.

    Also, if the email is formatted as HTML, I would do a test to see if all of the CSS formatting comes through correctly - complicated HTML emails usually work but getting all of the CSS styles to work like you would expect them to can sometimes be a little more work.

    Thanks,
    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Tuesday, March 24, 2009 4:45 PM
    Moderator
  • Hi Sandeep,

    I am in simillar requirement, could you please suggest how you read  subject line,To line, From line all those attributes from incoming POP3 email message?

    Thanks,

    Regards,
    Niraj

    Thursday, March 7, 2013 6:56 PM