Biztalk 2006 & POP3
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server General > Biztalk 2006 & POP3




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Biztalk 2006 & POP3  
Kev


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-24-06 12:50 PM

Has anyone used the POP3 adapter with Biztalk 2006?  I'm trying to get the
subject of the email and rename the attachment to this, before saving the
file to afile.
I can get the POP3 adapter to retrieve the message - but can't access the
attachment or message properties.   How can I access the subject and
attachment?  Is there a specific schema file I should be loading up?  The
attachment will be a gif or pdf ....

Thanks!

Kev





[ Post a follow-up to this message ]



    RE: Biztalk 2006 & POP3  
Matt Meleski


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-24-06 11:04 PM


To get the Subject of the email, in an orchestration:

strSubject = MyIncomingEmailMessage(POP3.Subject)

If you have only one attachment in your Email then in the
POP3 Receive Location Properties:

1) Set Apply MIME Encoding = True
2) Set Body Part Index = 2
3) Leave Body Part Content Type  Blank

The attachment should then be published into the messagebox

If have more than one attachment in your email:

To get the attachment, first let the message come through with the
the Receive Location POP3 Adapter Setting -> Apply MIME Encoding = False

Then create a File Send port that subscribes to the POP3 Receive Port with
a filter with something like :
BTS.ReceivePortName = MyPOP3ReceivePort

Then go to the file directory where the MIME encoded message was dropped off
by the Send Port and open it up in notepad.

Find the attachement in the message and then look for the attachement
section :
Content-Type:

Copy out the Content Type: For example for a word document it might look
like :  application/msword

Then go back to the POP3 Receive location and :
1) Set Apply MIME Encoding = True
2) Set Body Part Content Type = application/msword

That attachment should then be published in the MsgBox

Matt

"Kev" wrote:

> Has anyone used the POP3 adapter with Biztalk 2006?  I'm trying to get the
> subject of the email and rename the attachment to this, before saving the
> file to afile.
> I can get the POP3 adapter to retrieve the message - but can't access the
> attachment or message properties.   How can I access the subject and
> attachment?  Is there a specific schema file I should be loading up?  The
> attachment will be a gif or pdf ....
>
> Thanks!
>
> Kev





[ Post a follow-up to this message ]



    Re: Biztalk 2006 & POP3  
Steve Harclerode


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-25-06 01:53 AM

Is there a way similar to this to get the actual body of the message? I'd
like to be able to use it. In my case, the email itself is plain text, and
the attachment is XML.
(I already am succesfully processing the XML attachment).

Thanks,
Steve

"Matt Meleski" <MattMeleski@discussions.microsoft.com> wrote in message
news:2FDDEEB8-F91F-4C46-BE1D-062D3DEA8EF0@microsoft.com...
>
> To get the Subject of the email, in an orchestration:
>
> strSubject = MyIncomingEmailMessage(POP3.Subject)
>
> If you have only one attachment in your Email then in the
> POP3 Receive Location Properties:
>
> 1) Set Apply MIME Encoding = True
> 2) Set Body Part Index = 2
> 3) Leave Body Part Content Type  Blank
>
> The attachment should then be published into the messagebox
>







[ Post a follow-up to this message ]



    Re: Biztalk 2006 & POP3  
Matt Meleski


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-28-06 02:28 AM

Steve,

One way to do this is to let the Encoded MIME message come into an
orchestration, and then execute a series of Receive Pipelines in the
orchestration to extract the different parts of the email message as
explained below:

1) On your POP3 Receive Location Adapter Properties :

Set the Apply MIME Decoding property = False

2)

i) In a BizTalk Project, add a receive Pipeline (Can call it
ReceivePipelineBody)
and then drag a MIME/SMIME decoder from the toolbox into the Decode Section
of the Receive Pipeline.

For the properties of the MIME/SMIME decoder, set the :
Body Part Index = 0

This will extract out the Body part of the message

ii) In the same BizTalk Project, add a receive Pipeline (Can call it
ReceivePipelineAttachement)
and then drag a MIME/SMIME decoder from the toolbox into the Decode Section
of the Receive Pipeline.

For the properties of the MIME/SMIME decoder, set the :
Body Part Index = 2

This will extract out the Attachement part of the message


iii) Add an orchestration to the BizTalk project and then have it
Receive the initial Encoded message from the Receive Port/Location discussed
in 1).
In this Orchestration add a Expression shape with something like the below
to execute the receive Pipelines to extract out the different parts of the
Email message :

// First get the attachement.
varPipelineOutPutMessages =
Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecuteReceivePipeline(typeof
(Mod1BizTalk.ReceivePipelineAttachment), msgEmail);
varPipelineOutPutMessages.MoveNext();
construct msgAttachement
{
msgAttachement = null;
varPipelineOutPutMessages.GetCurrent(msgAttachement);
}

// Next get the body of the message
varPipelineOutPutMessages =
Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecuteReceivePipeline(typeof
(Mod1BizTalk.ReceivePipelineBody), msgEmail);
varPipelineOutPutMessages.MoveNext();
construct msgBody
{
msgBody = null;
varPipelineOutPutMessages.GetCurrent(msgBody);
}


If looking for an example on how to execute a Receive Pipeline in an
orchestration.
there is an example in the BizTalk 2006 SDK as here:
C:\Program Files\Microsoft BizTalk Server
 2006\SDK\Samples\Pipelines\ComposedMessa
geProcessor


Matt


"Steve Harclerode" wrote:

> Is there a way similar to this to get the actual body of the message? I'd
> like to be able to use it. In my case, the email itself is plain text, and
> the attachment is XML.
> (I already am succesfully processing the XML attachment).
>
> Thanks,
> Steve
>
> "Matt Meleski" <MattMeleski@discussions.microsoft.com> wrote in message
> news:2FDDEEB8-F91F-4C46-BE1D-062D3DEA8EF0@microsoft.com... 
>
>
>





[ Post a follow-up to this message ]



    RE: Biztalk 2006 & POP3  
Kev


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-28-06 02:28 AM

Thanks Matt, worked like a charm!

"Matt Meleski" wrote:
[vbcol=seagreen]
>
> To get the Subject of the email, in an orchestration:
>
> strSubject = MyIncomingEmailMessage(POP3.Subject)
>
> If you have only one attachment in your Email then in the
> POP3 Receive Location Properties:
>
> 1) Set Apply MIME Encoding = True
> 2) Set Body Part Index = 2
> 3) Leave Body Part Content Type  Blank
>
> The attachment should then be published into the messagebox
>
> If have more than one attachment in your email:
>
> To get the attachment, first let the message come through with the
> the Receive Location POP3 Adapter Setting -> Apply MIME Encoding = False
>
> Then create a File Send port that subscribes to the POP3 Receive Port with
> a filter with something like :
> BTS.ReceivePortName = MyPOP3ReceivePort
>
> Then go to the file directory where the MIME encoded message was dropped o
ff
> by the Send Port and open it up in notepad.
>
> Find the attachement in the message and then look for the attachement
> section :
> Content-Type:
>
> Copy out the Content Type: For example for a word document it might look
> like :  application/msword
>
> Then go back to the POP3 Receive location and :
> 1) Set Apply MIME Encoding = True
> 2) Set Body Part Content Type = application/msword
>
> That attachment should then be published in the MsgBox
>
> Matt
>
> "Kev" wrote:
> 





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:18 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register