Welcome to My blog POP3 Adapter
Here I am writing the blog on BizTalk POP3 Adapter for reading email at receive location.
Scenario: I have BizTalk interfaces and those are sending an error message on email id (xyz@domain.com) for notification. But I want to revert same error message to respective email ids with respect to an error, so I created solution below for reading mail from (xyz@domain.com) and revert same error to respective ids.
Solution: Below is the orchestration which is very simple
1st create logical receive port and send port
2nd create a schema for reading email text message
3rd create a receive pipeline for convert email file plain text to XML as below
Drag and drop the flat file disassembler and set the document schema property as schema file which is using for receive email text into XML.
4th Drag and drop the receive shape and set the type as schema which is created for reading email text into XML.
5th In expression step write the logic as per your requirement hereI writing logic to read the sso config. and extract the company code for send email to respective company contact person
6th construct the message which you want to send to respective company contact persons.
7th add send shape and assign constructed msg.My send port is dynamic.
the logic to send email using dynamic send port
//COMMENT STARTS:The email message related values being set.
MSG_EmailMessage = System.String.Empty;
MSG_EmailMessage(SMTP.Subject) = Var_Str_Subject;
MSG_EmailMessage(SMTP.From) = SSO.Utility.SSOClientHelper.Read("Configurations","SMTPFrom");
MSG_EmailMessage(SMTP.SMTPHost) = SSO.Utility.SSOClientHelper.Read("Configurations","SMTPHost");
MSG_EmailMessage(SMTP.EmailBodyText) =Var_String;
MSG_EmailMessage(SMTP.EmailBodyTextCharset) = SSO.Utility.SSOClientHelper.Read("Configurations","EmailBodyTextCharset");
MSG_EmailMessage(SMTP.SMTPAuthenticate) =System.Convert.ToUInt32(SSO.Utility.SSOClientHelper.Read("Configurations","SMTPAuthenticate"));
MSG_EmailMessage(Microsoft.XLANGs.BaseTypes.ContentType) = SSO.Utility.SSOClientHelper.Read("Configurations","ContentType");
Port_Dynamic_SendEmail(Microsoft.XLANGs.BaseTypes.Address)=SSO.Utility.SSOClientHelper.Read("Configurations","SMTPAddressToken") + Var_Str_EmailIds;
//COMMENT ENDS
8th Deploy the project and configure the application in BizTalk Admin Console.
Create physical receive port as below
Note : POP3 adapter works only on a 32-bit host.
9th Configure the application with Orchestration and Start it.
To test this application send email on xyz@domain.com it will send the same email through dynamic send port to respective company contact persons.
Thank You
Please revert me your feedback if you have any concern.





No comments:
Post a Comment