How to configure POP3 adapter to receive messages from Gmail and outlook.com in BizTalk

To receive messages from Gmail or Outlook.com you need to enable the POP3 at Gmail and Outlook.com settings.
Go to Gmail setting of your account and under Forwarding and POP/IMAP tab, Enable POP3 whether to receive all the emails or just or to receive the emails from now on.

Similarly, the setting for Outlook.com (under options > Connect devices and apps with POP) will look like below and choose the setting according to your requirement whether to delete them after download or not.

 Use the following setting at the BizTalk receive location to receive messages from outlook.com.

 

You can get the mail server details for Gmail from https://support.google.com/mail/troubleshooter/1668960?hl=en#ts=1665119,1665162
For Gmail use the below settings:

 

After filling in the above settings, you will be able to receive the messages from Gmail and outlook.com into BizTalk.
POP3 adapter has inbuilt MIME processing and you need to use the MIME pipeline component in the Receive pipeline, you can set the property Apply MIME decoding to true, which will promote the MIME headers to context and you will receive only the Message body.

 

In case you want to receive the raw MIME message, set the Apply MIME decoding to False.

 

In case there is an attachment in the incoming mail, the message will be published as the multipart message and you can use the option BodyPartindex property to choose your body part.

  

Here, I sent an attachment so the number of parts are 2 (email body + attachment), you can choose 0 for email body, 1 for 1st attachment, 2 for 2nd attachment and so on to set which will be your body part.

Hope this helps!

Happy BizTalking!!

Written by
Shashidharan Krishnan

Reviewed by
Jainath Ramanathan

Microsoft GTSC, India.

Comments

  • Anonymous
    May 30, 2017
    The comment has been removed