Query regarding POP3 adapter

Hello,

Please help me in understanding how to use POP3 adapter as I am using it for the first time. I have to receive the email using POP3 and send the name of the attachment  in the email as the filename through SFTP adapter. Please suggest me if can do it in pipeline component, If yes then how.

Waiting for your reply.

Thanks in advance.

Regards,

Ranjana

August 29th, 2015 2:07am

Hi ,

POP3 configuration is easy one ,so dont need to worry . You can go through the walkthrough to create POP3 receive location

Walkthrough: Creating a BizTalk Application That Uses the POP3 Adapter

Then go with POP3 Receive location configuration

How to Configure a POP3 Receive Location

once done you can do the email attachment processing of the incoming message through POP3 adapter inside Orchestration


http://blog.vertica.dk/2011/01/14/processing-multiple-email-attachments-with-biztalk-server-2009-using-pop3-adapter-and-orchestration/



Thanks

Abhishek


Free Windows Admin Tool Kit Click here and download it now
August 29th, 2015 2:44am

Hi Ranjana,

The scenario you were asking

Once after successfully receiving the messages, from the Message context you can read file name using pipeline component.

Getting the properties of a file attached to an email message in pipeline components

You read by part name or actual file name.

public void Disassemble(Microsoft.BizTalk.Component.Interop.IPipelineContext pc, Microsoft.BizTalk.Message.Interop.IBaseMessage inmsg)
{
var partName = string.Empty;
// we start from index 1 because index zero contains the body of the message
// which we are not interested
for (int i = 1; i < inmsg.PartCount; i++)
{
var currentPart = inmsg.GetPartByIndex(i, out partName);
var attachmentFileName = currentPart.PartProperties.Read("FileName", "http://schemas.microsoft.com/BizTalk/2003/mime-properties");
var outMsg = pc.GetMessageFactory().CreateMessage();
outMsg.AddPart("Body", pc.GetMessageFactory().CreateMessagePart(), true);
outMsg.Context = PipelineUtil.CloneMessageContext(inmsg.Context);
outMsg.Context.Write("ReceivedFileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties", attachmentFileName);
_msgs.Enqueue(outMsg);
}
}
public void Disassemble(Microsoft.BizTalk.Component.Interop.IPipelineContext pc, Microsoft.BizTalk.Message.Interop.IBaseMessage inmsg)
{
var partName = string.Empty;
// we start from index 1 because index zero contains the body of the message
// which we are not interested
for (int i = 1; i < inmsg.PartCount; i++)
{
var currentPart = inmsg.GetPartByIndex(i, out partName);
var outMsg = pc.GetMessageFactory().CreateMessage();
outMsg.AddPart("Body", pc.GetMessageFactory().CreateMessagePart(), true);
outMsg.Context = PipelineUtil.CloneMessageContext(inmsg.Context);
outMsg.Context.Write("ReceivedFileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties", partName);
_msgs.Enqueue(outMsg);
}
}

Blogs / Resources for understanding the POP3 flow.

You can go through below articles for understanding the basic flow, handling flow.

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

Biztalk POP3 Adapter Sample

BizTalk Server POP3 adapter

POP3 Sample Document

Email-attachments-in-biztalk-2006.

Thanks, SMSVikasK

August 29th, 2015 3:24am

Hi Ranjana,

Refer below threads for issues and resolutions.

Since you are updating the file name to context in SFTP send port you should use below macro,

SFTP send port macro : %SourceFileName%

BizTalk Server: How to Extract Email Attachments By Pipeline

https://social.msdn.microsoft.com/Forums/en-US/edf9eada-f30a-4581-96ed-1abcd9f923ff/biztalk-2010-pop3-attachement-pipeline-filename-issue?forum=biztalkgeneral#52b6e0ae-dbf6-4d50-bf63-6ddfcccd575b

Thanks, SMSVikasK

Free Windows Admin Tool Kit Click here and download it now
August 29th, 2015 3:34am

Hi ,

POP3 configuration is easy one ,so dont need to worry . You can go through the walkthrough to create POP3 receive location

Walkthrough: Creating a BizTalk Application That Uses the POP3 Adapter

Then go with POP3 Receive location configuration

How to Configure a POP3 Receive Location

once done you can do the email attachment processing of the incoming message through POP3 adapter inside Orchestration


http://blog.vertica.dk/2011/01/14/processing-multiple-email-attachments-with-biztalk-server-2009-using-pop3-adapter-and-orchestration/


For getting attachment  in the Pipeline component and reading the name sample code can be downloaded from https://code.msdn.microsoft.com/BizTalk-ServerHow-to-63a7167a

The detailed description is available over techNet wiki article written by Suleiman

http://social.technet.microsoft.com/wiki/contents/articles/21001.biztalk-server-how-to-extract-email-attachments-by-pipeline.aspx

Thanks

Abhishek

August 29th, 2015 6:40am

Hi ,

POP3 configuration is easy one ,so dont need to worry . You can go through the walkthrough to create POP3 receive location

Walkthrough: Creating a BizTalk Application That Uses the POP3 Adapter

Then go with POP3 Receive location configuration

How to Configure a POP3 Receive Location

once done you can do the email attachment processing of the incoming message through POP3 adapter inside Orchestration


http://blog.vertica.dk/2011/01/14/processing-multiple-email-attachments-with-biztalk-server-2009-using-pop3-adapter-and-orchestration/


For getting attachment  in the Pipeline component and reading the name sample code can be downloaded from https://code.msdn.microsoft.com/BizTalk-ServerHow-to-63a7167a

The detailed description is available over techNet wiki article written by Suleiman

http://social.technet.microsoft.com/wiki/contents/articles/21001.biztalk-server-how-to-extract-email-attachments-by-pipeline.aspx

Thanks

Abhishek

Free Windows Admin Tool Kit Click here and download it now
August 29th, 2015 6:40am

Hi ,

POP3 configuration is easy one ,so dont need to worry . You can go through the walkthrough to create POP3 receive location

Walkthrough: Creating a BizTalk Application That Uses the POP3 Adapter

Then go with POP3 Receive location configuration

How to Configure a POP3 Receive Location

once done you can do the email attachment processing of the incoming message through POP3 adapter inside Orchestration


http://blog.vertica.dk/2011/01/14/processing-multiple-email-attachments-with-biztalk-server-2009-using-pop3-adapter-and-orchestration/


For getting attachment  in the Pipeline component and reading the name sample code can be downloaded from https://code.msdn.microsoft.com/BizTalk-ServerHow-to-63a7167a

The detailed description is available over techNet wiki article written by Suleiman

http://social.technet.microsoft.com/wiki/contents/articles/21001.biztalk-server-how-to-extract-email-attachments-by-pipeline.aspx

Thanks

Abhishek

August 29th, 2015 6:40am

Hi ,

POP3 configuration is easy one ,so dont need to worry . You can go through the walkthrough to create POP3 receive location

Walkthrough: Creating a BizTalk Application That Uses the POP3 Adapter

Then go with POP3 Receive location configuration

How to Configure a POP3 Receive Location

once done you can do the email attachment processing of the incoming message through POP3 adapter inside Orchestration


http://blog.vertica.dk/2011/01/14/processing-multiple-email-attachments-with-biztalk-server-2009-using-pop3-adapter-and-orchestration/


For getting attachment  in the Pipeline component and reading the name sample code can be downloaded from https://code.msdn.microsoft.com/BizTalk-ServerHow-to-63a7167a

The detailed description is available over techNet wiki article written by Suleiman

http://social.technet.microsoft.com/wiki/contents/articles/21001.biztalk-server-how-to-extract-email-attachments-by-pipeline.aspx

Thanks

Abhishek

Free Windows Admin Tool Kit Click here and download it now
August 29th, 2015 6:40am

Hi ,

POP3 configuration is easy one ,so dont need to worry . You can go through the walkthrough to create POP3 receive location

Walkthrough: Creating a BizTalk Application That Uses the POP3 Adapter

Then go with POP3 Receive location configuration

How to Configure a POP3 Receive Location

once done you can do the email attachment processing of the incoming message through POP3 adapter inside Orchestration


http://blog.vertica.dk/2011/01/14/processing-multiple-email-attachments-with-biztalk-server-2009-using-pop3-adapter-and-orchestration/


For getting attachment  in the Pipeline component and reading the name sample code can be downloaded from https://code.msdn.microsoft.com/BizTalk-ServerHow-to-63a7167a

The detailed description is available over techNet wiki article written by Suleiman

http://social.technet.microsoft.com/wiki/contents/articles/21001.biztalk-server-how-to-extract-email-attachments-by-pipeline.aspx

Thanks

Abhishek

August 29th, 2015 6:40am

Hi ,

POP3 configuration is easy one ,so dont need to worry . You can go through the walkthrough to create POP3 receive location

Walkthrough: Creating a BizTalk Application That Uses the POP3 Adapter

Then go with POP3 Receive location configuration

How to Configure a POP3 Receive Location

once done you can do the email attachment processing of the incoming message through POP3 adapter inside Orchestration


http://blog.vertica.dk/2011/01/14/processing-multiple-email-attachments-with-biztalk-server-2009-using-pop3-adapter-and-orchestration/


For getting attachment  in the Pipeline component and reading the name sample code can be downloaded from https://code.msdn.microsoft.com/BizTalk-ServerHow-to-63a7167a

The detailed description is available over techNet wiki article written by Suleiman

http://social.technet.microsoft.com/wiki/contents/articles/21001.biztalk-server-how-to-extract-email-attachments-by-pipeline.aspx

Thanks

Abhishek

Free Windows Admin Tool Kit Click here and download it now
August 29th, 2015 6:40am

Hi ,

POP3 configuration is easy one ,so dont need to worry . You can go through the walkthrough to create POP3 receive location

Walkthrough: Creating a BizTalk Application That Uses the POP3 Adapter

Then go with POP3 Receive location configuration

How to Configure a POP3 Receive Location

once done you can do the email attachment processing of the incoming message through POP3 adapter inside Orchestration


http://blog.vertica.dk/2011/01/14/processing-multiple-email-attachments-with-biztalk-server-2009-using-pop3-adapter-and-orchestration/


For getting attachment  in the Pipeline component and reading the name sample code can be downloaded from https://code.msdn.microsoft.com/BizTalk-ServerHow-to-63a7167a

The detailed description is available over techNet wiki article written by Suleiman

http://social.technet.microsoft.com/wiki/contents/articles/21001.biztalk-server-how-to-extract-email-attachments-by-pipeline.aspx

Thanks

Abhishek

August 29th, 2015 6:40am

Hi Ranjana,

The scenario you were asking

Once after successfully receiving the messages, from the Message context you can read file name using pipeline component.

Getting the properties of a file attached to an email message in pipeline components

You read by part name or actual file name.

public void Disassemble(Microsoft.BizTalk.Component.Interop.IPipelineContext pc, Microsoft.BizTalk.Message.Interop.IBaseMessage inmsg)
{
var partName = string.Empty;
// we start from index 1 because index zero contains the body of the message
// which we are not interested
for (int i = 1; i < inmsg.PartCount; i++)
{
var currentPart = inmsg.GetPartByIndex(i, out partName);
var attachmentFileName = currentPart.PartProperties.Read("FileName", "http://schemas.microsoft.com/BizTalk/2003/mime-properties");
var outMsg = pc.GetMessageFactory().CreateMessage();
outMsg.AddPart("Body", pc.GetMessageFactory().CreateMessagePart(), true);
outMsg.Context = PipelineUtil.CloneMessageContext(inmsg.Context);
outMsg.Context.Write("ReceivedFileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties", attachmentFileName);
_msgs.Enqueue(outMsg);
}
}
public void Disassemble(Microsoft.BizTalk.Component.Interop.IPipelineContext pc, Microsoft.BizTalk.Message.Interop.IBaseMessage inmsg)
{
var partName = string.Empty;
// we start from index 1 because index zero contains the body of the message
// which we are not interested
for (int i = 1; i < inmsg.PartCount; i++)
{
var currentPart = inmsg.GetPartByIndex(i, out partName);
var outMsg = pc.GetMessageFactory().CreateMessage();
outMsg.AddPart("Body", pc.GetMessageFactory().CreateMessagePart(), true);
outMsg.Context = PipelineUtil.CloneMessageContext(inmsg.Context);
outMsg.Context.Write("ReceivedFileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties", partName);
_msgs.Enqueue(outMsg);
}
}

Blogs / Resources for understanding the POP3 flow.

You can go through below articles for understanding the basic flow, handling flow.

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

Biztalk POP3 Adapter Sample

BizTalk Server POP3 adapter

POP3 Sample Document

Email-attachments-in-biztalk-2006.

Thanks, SMSVikasK

Free Windows Admin Tool Kit Click here and download it now
August 29th, 2015 7:18am

Hi Ranjana,

The scenario you were asking

Once after successfully receiving the messages, from the Message context you can read file name using pipeline component.

Getting the properties of a file attached to an email message in pipeline components

You read by part name or actual file name.

public void Disassemble(Microsoft.BizTalk.Component.Interop.IPipelineContext pc, Microsoft.BizTalk.Message.Interop.IBaseMessage inmsg)
{
var partName = string.Empty;
// we start from index 1 because index zero contains the body of the message
// which we are not interested
for (int i = 1; i < inmsg.PartCount; i++)
{
var currentPart = inmsg.GetPartByIndex(i, out partName);
var attachmentFileName = currentPart.PartProperties.Read("FileName", "http://schemas.microsoft.com/BizTalk/2003/mime-properties");
var outMsg = pc.GetMessageFactory().CreateMessage();
outMsg.AddPart("Body", pc.GetMessageFactory().CreateMessagePart(), true);
outMsg.Context = PipelineUtil.CloneMessageContext(inmsg.Context);
outMsg.Context.Write("ReceivedFileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties", attachmentFileName);
_msgs.Enqueue(outMsg);
}
}
public void Disassemble(Microsoft.BizTalk.Component.Interop.IPipelineContext pc, Microsoft.BizTalk.Message.Interop.IBaseMessage inmsg)
{
var partName = string.Empty;
// we start from index 1 because index zero contains the body of the message
// which we are not interested
for (int i = 1; i < inmsg.PartCount; i++)
{
var currentPart = inmsg.GetPartByIndex(i, out partName);
var outMsg = pc.GetMessageFactory().CreateMessage();
outMsg.AddPart("Body", pc.GetMessageFactory().CreateMessagePart(), true);
outMsg.Context = PipelineUtil.CloneMessageContext(inmsg.Context);
outMsg.Context.Write("ReceivedFileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties", partName);
_msgs.Enqueue(outMsg);
}
}

Blogs / Resources for understanding the POP3 flow.

You can go through below articles for understanding the basic flow, handling flow.

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

Biztalk POP3 Adapter Sample

BizTalk Server POP3 adapter

POP3 Sample Document

Email-attachments-in-biztalk-2006.

Thanks, SMSVikasK

August 29th, 2015 7:18am

Hi Ranjana,

The scenario you were asking

Once after successfully receiving the messages, from the Message context you can read file name using pipeline component.

Getting the properties of a file attached to an email message in pipeline components

You read by part name or actual file name.

public void Disassemble(Microsoft.BizTalk.Component.Interop.IPipelineContext pc, Microsoft.BizTalk.Message.Interop.IBaseMessage inmsg)
{
var partName = string.Empty;
// we start from index 1 because index zero contains the body of the message
// which we are not interested
for (int i = 1; i < inmsg.PartCount; i++)
{
var currentPart = inmsg.GetPartByIndex(i, out partName);
var attachmentFileName = currentPart.PartProperties.Read("FileName", "http://schemas.microsoft.com/BizTalk/2003/mime-properties");
var outMsg = pc.GetMessageFactory().CreateMessage();
outMsg.AddPart("Body", pc.GetMessageFactory().CreateMessagePart(), true);
outMsg.Context = PipelineUtil.CloneMessageContext(inmsg.Context);
outMsg.Context.Write("ReceivedFileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties", attachmentFileName);
_msgs.Enqueue(outMsg);
}
}
public void Disassemble(Microsoft.BizTalk.Component.Interop.IPipelineContext pc, Microsoft.BizTalk.Message.Interop.IBaseMessage inmsg)
{
var partName = string.Empty;
// we start from index 1 because index zero contains the body of the message
// which we are not interested
for (int i = 1; i < inmsg.PartCount; i++)
{
var currentPart = inmsg.GetPartByIndex(i, out partName);
var outMsg = pc.GetMessageFactory().CreateMessage();
outMsg.AddPart("Body", pc.GetMessageFactory().CreateMessagePart(), true);
outMsg.Context = PipelineUtil.CloneMessageContext(inmsg.Context);
outMsg.Context.Write("ReceivedFileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties", partName);
_msgs.Enqueue(outMsg);
}
}

Blogs / Resources for understanding the POP3 flow.

You can go through below articles for understanding the basic flow, handling flow.

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

Biztalk POP3 Adapter Sample

BizTalk Server POP3 adapter

POP3 Sample Document

Email-attachments-in-biztalk-2006.

Thanks, SMSVikasK

Free Windows Admin Tool Kit Click here and download it now
August 29th, 2015 7:18am

Hi Ranjana,

The scenario you were asking

Once after successfully receiving the messages, from the Message context you can read file name using pipeline component.

Getting the properties of a file attached to an email message in pipeline components

You read by part name or actual file name.

public void Disassemble(Microsoft.BizTalk.Component.Interop.IPipelineContext pc, Microsoft.BizTalk.Message.Interop.IBaseMessage inmsg)
{
var partName = string.Empty;
// we start from index 1 because index zero contains the body of the message
// which we are not interested
for (int i = 1; i < inmsg.PartCount; i++)
{
var currentPart = inmsg.GetPartByIndex(i, out partName);
var attachmentFileName = currentPart.PartProperties.Read("FileName", "http://schemas.microsoft.com/BizTalk/2003/mime-properties");
var outMsg = pc.GetMessageFactory().CreateMessage();
outMsg.AddPart("Body", pc.GetMessageFactory().CreateMessagePart(), true);
outMsg.Context = PipelineUtil.CloneMessageContext(inmsg.Context);
outMsg.Context.Write("ReceivedFileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties", attachmentFileName);
_msgs.Enqueue(outMsg);
}
}
public void Disassemble(Microsoft.BizTalk.Component.Interop.IPipelineContext pc, Microsoft.BizTalk.Message.Interop.IBaseMessage inmsg)
{
var partName = string.Empty;
// we start from index 1 because index zero contains the body of the message
// which we are not interested
for (int i = 1; i < inmsg.PartCount; i++)
{
var currentPart = inmsg.GetPartByIndex(i, out partName);
var outMsg = pc.GetMessageFactory().CreateMessage();
outMsg.AddPart("Body", pc.GetMessageFactory().CreateMessagePart(), true);
outMsg.Context = PipelineUtil.CloneMessageContext(inmsg.Context);
outMsg.Context.Write("ReceivedFileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties", partName);
_msgs.Enqueue(outMsg);
}
}

Blogs / Resources for understanding the POP3 flow.

You can go through below articles for understanding the basic flow, handling flow.

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

Biztalk POP3 Adapter Sample

BizTalk Server POP3 adapter

POP3 Sample Document

Email-attachments-in-biztalk-2006.

Thanks, SMSVikasK

August 29th, 2015 7:18am

Hi Ranjana,

The scenario you were asking

Once after successfully receiving the messages, from the Message context you can read file name using pipeline component.

Getting the properties of a file attached to an email message in pipeline components

You read by part name or actual file name.

public void Disassemble(Microsoft.BizTalk.Component.Interop.IPipelineContext pc, Microsoft.BizTalk.Message.Interop.IBaseMessage inmsg)
{
var partName = string.Empty;
// we start from index 1 because index zero contains the body of the message
// which we are not interested
for (int i = 1; i < inmsg.PartCount; i++)
{
var currentPart = inmsg.GetPartByIndex(i, out partName);
var attachmentFileName = currentPart.PartProperties.Read("FileName", "http://schemas.microsoft.com/BizTalk/2003/mime-properties");
var outMsg = pc.GetMessageFactory().CreateMessage();
outMsg.AddPart("Body", pc.GetMessageFactory().CreateMessagePart(), true);
outMsg.Context = PipelineUtil.CloneMessageContext(inmsg.Context);
outMsg.Context.Write("ReceivedFileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties", attachmentFileName);
_msgs.Enqueue(outMsg);
}
}
public void Disassemble(Microsoft.BizTalk.Component.Interop.IPipelineContext pc, Microsoft.BizTalk.Message.Interop.IBaseMessage inmsg)
{
var partName = string.Empty;
// we start from index 1 because index zero contains the body of the message
// which we are not interested
for (int i = 1; i < inmsg.PartCount; i++)
{
var currentPart = inmsg.GetPartByIndex(i, out partName);
var outMsg = pc.GetMessageFactory().CreateMessage();
outMsg.AddPart("Body", pc.GetMessageFactory().CreateMessagePart(), true);
outMsg.Context = PipelineUtil.CloneMessageContext(inmsg.Context);
outMsg.Context.Write("ReceivedFileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties", partName);
_msgs.Enqueue(outMsg);
}
}

Blogs / Resources for understanding the POP3 flow.

You can go through below articles for understanding the basic flow, handling flow.

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

Biztalk POP3 Adapter Sample

BizTalk Server POP3 adapter

POP3 Sample Document

Email-attachments-in-biztalk-2006.

Thanks, SMSVikasK

Free Windows Admin Tool Kit Click here and download it now
August 29th, 2015 7:18am

Hi Ranjana,

The scenario you were asking

Once after successfully receiving the messages, from the Message context you can read file name using pipeline component.

Getting the properties of a file attached to an email message in pipeline components

You read by part name or actual file name.

public void Disassemble(Microsoft.BizTalk.Component.Interop.IPipelineContext pc, Microsoft.BizTalk.Message.Interop.IBaseMessage inmsg)
{
var partName = string.Empty;
// we start from index 1 because index zero contains the body of the message
// which we are not interested
for (int i = 1; i < inmsg.PartCount; i++)
{
var currentPart = inmsg.GetPartByIndex(i, out partName);
var attachmentFileName = currentPart.PartProperties.Read("FileName", "http://schemas.microsoft.com/BizTalk/2003/mime-properties");
var outMsg = pc.GetMessageFactory().CreateMessage();
outMsg.AddPart("Body", pc.GetMessageFactory().CreateMessagePart(), true);
outMsg.Context = PipelineUtil.CloneMessageContext(inmsg.Context);
outMsg.Context.Write("ReceivedFileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties", attachmentFileName);
_msgs.Enqueue(outMsg);
}
}
public void Disassemble(Microsoft.BizTalk.Component.Interop.IPipelineContext pc, Microsoft.BizTalk.Message.Interop.IBaseMessage inmsg)
{
var partName = string.Empty;
// we start from index 1 because index zero contains the body of the message
// which we are not interested
for (int i = 1; i < inmsg.PartCount; i++)
{
var currentPart = inmsg.GetPartByIndex(i, out partName);
var outMsg = pc.GetMessageFactory().CreateMessage();
outMsg.AddPart("Body", pc.GetMessageFactory().CreateMessagePart(), true);
outMsg.Context = PipelineUtil.CloneMessageContext(inmsg.Context);
outMsg.Context.Write("ReceivedFileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties", partName);
_msgs.Enqueue(outMsg);
}
}

Blogs / Resources for understanding the POP3 flow.

You can go through below articles for understanding the basic flow, handling flow.

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

Biztalk POP3 Adapter Sample

BizTalk Server POP3 adapter

POP3 Sample Document

Email-attachments-in-biztalk-2006.

Thanks, SMSVikasK

August 29th, 2015 7:18am

Hi Ranjana,

Refer below threads for issues and resolutions.

Since you are updating the file name to context in SFTP send port you should use below macro,

SFTP send port macro : %SourceFileName%

BizTalk Server: How to Extract Email Attachments By Pipeline

https://social.msdn.microsoft.com/Forums/en-US/edf9eada-f30a-4581-96ed-1abcd9f923ff/biztalk-2010-pop3-attachement-pipeline-filename-issue?forum=biztalkgeneral#52b6e0ae-dbf6-4d50-bf63-6ddfcccd575b

Thanks, SMSVikasK

Free Windows Admin Tool Kit Click here and download it now
August 29th, 2015 7:28am

Hi Ranjana,

Refer below threads for issues and resolutions.

Since you are updating the file name to context in SFTP send port you should use below macro,

SFTP send port macro : %SourceFileName%

BizTalk Server: How to Extract Email Attachments By Pipeline

https://social.msdn.microsoft.com/Forums/en-US/edf9eada-f30a-4581-96ed-1abcd9f923ff/biztalk-2010-pop3-attachement-pipeline-filename-issue?forum=biztalkgeneral#52b6e0ae-dbf6-4d50-bf63-6ddfcccd575b

Thanks, SMSVikasK

  • Marked as answer by Ranjana_Torreti Wednesday, September 02, 2015 4:34 AM
August 29th, 2015 7:28am

Hi Ranjana,

Refer below threads for issues and resolutions.

Since you are updating the file name to context in SFTP send port you should use below macro,

SFTP send port macro : %SourceFileName%

BizTalk Server: How to Extract Email Attachments By Pipeline

https://social.msdn.microsoft.com/Forums/en-US/edf9eada-f30a-4581-96ed-1abcd9f923ff/biztalk-2010-pop3-attachement-pipeline-filename-issue?forum=biztalkgeneral#52b6e0ae-dbf6-4d50-bf63-6ddfcccd575b

Thanks, SMSVikasK

  • Marked as answer by Ranjana_Torreti Wednesday, September 02, 2015 4:34 AM
Free Windows Admin Tool Kit Click here and download it now
August 29th, 2015 7:28am

Hi Ranjana,

Refer below threads for issues and resolutions.

Since you are updating the file name to context in SFTP send port you should use below macro,

SFTP send port macro : %SourceFileName%

BizTalk Server: How to Extract Email Attachments By Pipeline

https://social.msdn.microsoft.com/Forums/en-US/edf9eada-f30a-4581-96ed-1abcd9f923ff/biztalk-2010-pop3-attachement-pipeline-filename-issue?forum=biztalkgeneral#52b6e0ae-dbf6-4d50-bf63-6ddfcccd575b

Thanks, SMSVikasK

  • Marked as answer by Ranjana_Torreti Wednesday, September 02, 2015 4:34 AM
August 29th, 2015 7:28am

Hi Vikas,

I tried the link:BizTalk Server: How to Extract Email Attachments By Pipeline which you provided but while testing I found out that the GetNext method is returning me a null value.

I even tried the code at:http://blogs.4ward.it/getting-the-properties-of-a-file-attached-to-an-email-message-in-pipeline-components/

This to returns a null value at GetNext Method.

Please help.

Regards,

Ranjana

Free Windows Admin Tool Kit Click here and download it now
September 2nd, 2015 11:05am

Hi Vikas,

I tried the link:BizTalk Server: How to Extract Email Attachments By Pipeline which you provided but while testing I found out that the GetNext method is returning me a null value.

I even tried the code at:http://blogs.4ward.it/getting-the-properties-of-a-file-attached-to-an-email-message-in-pipeline-components/

This to returns a null value at GetNext Method.

Please help.

Regards,

Ranjana

September 2nd, 2015 2:59pm

Hi Vikas,

I tried the link:BizTalk Server: How to Extract Email Attachments By Pipeline which you provided but while testing I found out that the GetNext method is returning me a null value.

I even tried the code at:http://blogs.4ward.it/getting-the-properties-of-a-file-attached-to-an-email-message-in-pipeline-components/

This to returns a null value at GetNext Method.

Please help.

Regards,

Ranjana

Free Windows Admin Tool Kit Click here and download it now
September 2nd, 2015 2:59pm

Hi Vikas,

I tried the link:BizTalk Server: How to Extract Email Attachments By Pipeline which you provided but while testing I found out that the GetNext method is returning me a null value.

I even tried the code at:http://blogs.4ward.it/getting-the-properties-of-a-file-attached-to-an-email-message-in-pipeline-components/

This to returns a null value at GetNext Method.

Please help.

Regards,

Ranjana

September 2nd, 2015 2:59pm

Hi Vikas,

I tried the link:BizTalk Server: How to Extract Email Attachments By Pipeline which you provided but while testing I found out that the GetNext method is returning me a null value.

I even tried the code at:http://blogs.4ward.it/getting-the-properties-of-a-file-attached-to-an-email-message-in-pipeline-components/

This to returns a null value at GetNext Method.

Please help.

Regards,

Ranjana

Free Windows Admin Tool Kit Click here and download it now
September 2nd, 2015 2:59pm

Hi Ranjana,

Please follow the below steps to find the reason behind.

- Check the part by index in your receive location POP3 adapter property.

- Add some System.Diagnostics.EventLog.WriteEntry("DisplayName","Variable"); around Disassemble, GetNext methods.

- Ensure that it is entering for loop and its adding message to queue, count should be more than 1 in GetNext.

Let me know if you face any issues after this steps.

Thanks, SMSVikasK

September 3rd, 2015 1:06am

Hi Vikas,

I followed the steps you mentioned and got the output for text file but for excel file as an input i get a corrupted file. Please suggest how to resolve.

Free Windows Admin Tool Kit Click here and download it now
September 3rd, 2015 2:48am

Hi Ranjana,

Please follow the below steps to find the reason behind.

- Check the part by index in your receive location POP3 adapter property.

- Add some System.Diagnostics.EventLog.WriteEntry("DisplayName","Variable"); around Disassemble, GetNext methods.

- Ensure that it is entering for loop and its adding message to queue, count should be more than 1 in GetNext.

Let me know if you face any issues after this steps.

Thanks, SMSVikasK

September 3rd, 2015 4:59am

Hi Ranjana,

Please follow the below steps to find the reason behind.

- Check the part by index in your receive location POP3 adapter property.

- Add some System.Diagnostics.EventLog.WriteEntry("DisplayName","Variable"); around Disassemble, GetNext methods.

- Ensure that it is entering for loop and its adding message to queue, count should be more than 1 in GetNext.

Let me know if you face any issues after this steps.

Thanks, SMSVikasK

Free Windows Admin Tool Kit Click here and download it now
September 3rd, 2015 4:59am

Hi Ranjana,

Please follow the below steps to find the reason behind.

- Check the part by index in your receive location POP3 adapter property.

- Add some System.Diagnostics.EventLog.WriteEntry("DisplayName","Variable"); around Disassemble, GetNext methods.

- Ensure that it is entering for loop and its adding message to queue, count should be more than 1 in GetNext.

Let me know if you face any issues after this steps.

Thanks, SMSVikasK

September 3rd, 2015 4:59am

Hi Ranjana,

Please follow the below steps to find the reason behind.

- Check the part by index in your receive location POP3 adapter property.

- Add some System.Diagnostics.EventLog.WriteEntry("DisplayName","Variable"); around Disassemble, GetNext methods.

- Ensure that it is entering for loop and its adding message to queue, count should be more than 1 in GetNext.

Let me know if you face any issues after this steps.

Thanks, SMSVikasK

Free Windows Admin Tool Kit Click here and download it now
September 3rd, 2015 4:59am

Hi Ranjana,

I Agree there is a bug in that code, have fixed that now with the below code.

Please replace the below lines code with this.

string attachmentContent = Encoding.Default.GetString(ms.ToArray());

MemoryStream attachmentStream = new System.IO.MemoryStream(System.Text.Encoding.Default.GetBytes(attachmentContent));

Have tested the 3 scenarios.

- Text file

- XML file

- Excel File

Let us know if you face any issue again.

Thanks, SMSVikasK

September 3rd, 2015 7:39am

It worked!!! 

Thanks a lot!!!!!

Free Windows Admin Tool Kit Click here and download it now
September 3rd, 2015 11:11am

Hi Ranjana,

I Agree there is a bug in that code, have fixed that now with the below code.

Please replace the below lines code with this.

string attachmentContent = Encoding.Default.GetString(ms.ToArray());

MemoryStream attachmentStream = new System.IO.MemoryStream(System.Text.Encoding.Default.GetBytes(attachmentContent));

Have tested the 3 scenarios.

- Text file

- XML file

- Excel File

Let us know if you face any issue again.

Thanks, SMSVikasK

  • Proposed as answer by SMSVikasK Thursday, September 03, 2015 12:26 PM
  • Marked as answer by Ranjana_Torreti Thursday, September 03, 2015 2:49 PM
September 3rd, 2015 11:18am

Hi Ranjana,

I Agree there is a bug in that code, have fixed that now with the below code.

Please replace the below lines code with this.

string attachmentContent = Encoding.Default.GetString(ms.ToArray());

MemoryStream attachmentStream = new System.IO.MemoryStream(System.Text.Encoding.Default.GetBytes(attachmentContent));

Have tested the 3 scenarios.

- Text file

- XML file

- Excel File

Let us know if you face any issue again.

Thanks, SMSVikasK

  • Proposed as answer by SMSVikasK Thursday, September 03, 2015 12:26 PM
  • Marked as answer by Ranjana_Torreti Thursday, September 03, 2015 2:49 PM
Free Windows Admin Tool Kit Click here and download it now
September 3rd, 2015 11:18am

Hi Ranjana,

I Agree there is a bug in that code, have fixed that now with the below code.

Please replace the below lines code with this.

string attachmentContent = Encoding.Default.GetString(ms.ToArray());

MemoryStream attachmentStream = new System.IO.MemoryStream(System.Text.Encoding.Default.GetBytes(attachmentContent));

Have tested the 3 scenarios.

- Text file

- XML file

- Excel File

Let us know if you face any issue again.

Thanks, SMSVikasK

  • Proposed as answer by SMSVikasK Thursday, September 03, 2015 12:26 PM
  • Marked as answer by Ranjana_Torreti Thursday, September 03, 2015 2:49 PM
September 3rd, 2015 11:18am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics