Email attachments – POP3 adapter

Home Page Forums BizTalk 2004 – BizTalk 2010 Email attachments – POP3 adapter

Viewing 1 reply thread
  • Author
    Posts
    • #15209

      I think the pop adapter will put all the attachments into message parts. I’m guessing you could pass that message off to a helper class and return the single messages one at a time. I’m guessing.

    • #15210

      It’s actually much easer then that.
      I took me about 4 lines inside an two expression shape and a loop.

      I’ll post the sample later tonight.

      • #15211
        • #15212

          Oh great! I didn’t even think of that.

          I j ust tested it and when I used Part.Name I was only able to get a GUID and not the attachment name. Could you get the Attachment Name?

          • #15213

            Hi
            I need to get email with attachments and just transfer them “as is” from folder A to folder B (also I need to get the name of the file)
            How can I do that? Should I execute pipeline inside my orchestration?
            Should I know in advance how many attachments I have (some sort of “count” method)

            10x!

            • #15214

              how can i pass the message to an helper class?

              • #15215

                GREAT !!

                the only thing that left is how can I get the attachment orginal file name?

                • #15216

                  now i can get the name.
                  i created a new var (MsgPart) which is Microsoft.XLANGs.BaseTypes.XLANGPart type

                  MsgPart = oXMessage[n];
                  OrginalFileName = MsgPart.Name;

                  • #15217

                    Hi Stephan,
                    yes, im getting the the orginial attach file name, and save it using dynamic file port because location is dynamic

                    // Note the n was initilized to 1 inside Variables

                    // Get the n’th part and set to a new message
                    Out = oXMessage[n];

                    MsgPart = oXMessage[n];
                    OrginalFileName = MsgPart.Name;

                    // Add to count
                    n = n + 1;



                    SaveFile(Microsoft.XLANGs.BaseTypes.Address) = CTSBaseFolderPort + MBFolderName + \”/\” + System.Convert.ToString(rNum)+ \”_att/\” + OrginalFileName;

                    • #15541

                      Hi Stephan,

                       I'm trying to get the original file name and route according to it, but without success.

                      I got an expression shape with the following code inside the while loop:

                      // picking message n

                      msgPart = oXMessage[n];

                      // Name of message n file

                      msgName = msgPart.Name;

                      and directly after I got a decide shape with the following code:

                      msgName.Contains("edi") == true

                      it doesn't work…

                      any idee what I'm doing wrong?

                      In your application did you have pipelines set to pass through?

                      msgName.Contains("edi") == true

                      it doesn't work…

                      any idee what I'm doing wrong?

                      In your application did you have pipelines set to pass through?

                      • #15547

                        If I remember right I did use pass through pipelines.

                         

                        I’ve never tried to use .contains on the message name.  You might have to pass the name out to a .net component that does this check.  Also, you might want to set an Orchestration variable to your name and then use this to set the part name and pass to the component.

                         

                        Hope this helps.

                      • #15552

                        [quote user="Stephen W. Thomas"]

                        If I remember right I did use pass through pipelines.

                        I’ve never tried to use .contains on the message name.  You might have to pass the name out to a .net component that does this check.  Also, you might want to set an Orchestration variable to your name and then use this to set the part name and pass to the component.

                        Hope this helps.

                        [/quote]

                         Hi!

                        The problem is not .contains , I've tried it with default values and it works.

                        It seams that,

                        msgName = msgPart.Name;

                        doesn't return the filename. Is there any way to "print" out the variable msgName from the orchestration?

                      • #15553

                        Have you tried:

                        msgname = msgpart(MIME.FileName)

                      • #15558

                        Yes, and just retried it.

                        Again, my transaction is dehydrated and I terminated from the Admin Console.

                        Phil

                      • #15560

                        My apologies – not dehydrated, rather showing as "retrying and idle ports".

                        Phil

                      • #15566

                        I had the same problem and wasn’t able to set the file name.

                         

                        I’m not sure the name is even there.  You might need to do some pipeline work to get the part name. 

                      • #18307

                        Can Anybody tell me what is the maximum message size that I can transfer thought  POP3 Adapter and how many messages that POP3 Adapter passes in one second..??

                      • #18491

                         An after Turkey Day experience:

                        I did have issues with number of attachments.  It seems anything over 4 attachments and my virus(Symantec) checking software was unable to extract the files and the service just sat there in active state until I terminated it.  

                        Event Viewer gives me this message

                        “Could not scan 5 files inside C:\Documents and Settings\maloneyd\Local Settings\Temporary Internet Files\Content.IE5\1M94TBXJ\273599_ENU_i386_zip[1].exe due to extraction errors encountered by the Decomposer Engines.”

                        I am still troubleshooting this. My attachment sizes were as follows, 750K, 1.5M, 3M and 6M. Adding one more file smaller or larger, caused the above problem. regarding file attachment size, I was not able to find any documentation of maximum size but was successful in processing a 20M attachment.  Any larger was restricted in email by file attachment sizes for the Exchange server. 

                        When this application goes live I will need to have that changed for the email account Biztalk monitors.  I guess the point being, there may be enterprise email file size attachment issues long before Biztalk has a problem with the size of file.  

                         

                      • #25064

                        1) I need to name of each attachment. 

                        2) I have used 

                        msgEmailOut = varXmessage[n];

                        MsgPart=varXmessage[n];

                        msgEmailOut(FILE.ReceivedFileName) = MsgPart.Name;

                        n = n + 1;

                        3) when i send 2 pdf files – a) Test1.pdf
                        b) Test2.pdf

                        I have 3 files frop at my location 

                        a) Test1.pdf
                        b) %SourceFileName%
                        c) {D0899C9C-F115-44EB-98E8-072CFAD9B0A0}

                        and when i debug – I do’t see and MsgPart.Name

                      • #16458

                        Hi Greg,

                         Thanks a lot ….this post help me a lot…..

                        schanda

                      • #16471

                        To get out the attachment file name you can find it in the MIME properties.
                        Eks.

                        // Get the n'th part and set to a new message
                        Out = oXMessage[n];

                        // Set message properties
                        Out(FILE.ReceivedFileName) = Out(MIME.FileName);

                        This works for me on Biztalk 2006. In Biztalk 2004 you have to use the SMTPUtils class.
                        Hope this hepls you out
                         

                        Regards
                        Benny Helander

                    • #15557

                      I can not get to work.
                      If I use:

                      OriginalFileName = MsgPart.Name;

                      My email message gets dehydrated.

                      And the SaveFile generates an error; do I need to be referencing a specific library?
                      Any positive direcition is appreciated.

                      Thanks,
                      Phil

                       

                       

                    • #16991

                      Hi eladar,

                      I tried your stript, the escape letter occurs an erro when I use the SaveFile script. Do you know how to fix it?

                       

                      My the way, how an I get the messageid ?

                      Thanks.

                       

                  • #18274

                    Hi eladr,

                    I'm trying to get my attachments with their original file names and extensions. I'm not a programmer so could you explain how i would create the new var Microsoft.XLANGs.BaseTypes.XLANGPart type that you have mentioned?

                    Chris.

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.