sending an email attachment from a blob field in a database

Home Page Forums BizTalk 2004 – BizTalk 2010 sending an email attachment from a blob field in a database

Viewing 1 reply thread
  • Author
    Posts
    • #16182

      I'm not much of a BizTalk guru (more of .NET developer) so pardon my ignorance.

       I
      have created a simple BizTalk project that pulls data from a database
      and sends an email to the specified email address from the email
      address field.

      My users now want to add attachments to the email. 

      I'm pretty sure that the schema won't be able to handle a blob
      field so I'm guessing I'll have to stream it.  Is that
      right?  Also reading from
      http://www.biztalkgurus.com/forums/thread/2576.aspx, it says that I should "To send file attachments you use multi-part messages and the MIME/SMIME encoder
      pipeline component.
      ". 
      I know what a multi-part message is and a MIME/SMIME encoder pipeline
      component is but do you have any more details of how to implement
      this?  Maybe some link?

       Thanks, Bill N

       

    • #16187

      I’ve never tied adding an Attachment in BizTalk.

       

      I think your best bet is to use helper .net component.  I think you just need to add another part to you message and is the attachment.  There was a really good sample about this on Scott Woodgates blog a few years ago now… I think it was here: http://blogs.msdn.com/scottwoo/archive/2004/04/19/116298.aspx

       

      I’m not sure if the samples are still available.  It added an infopath form as an Attachment – but the concept is the same.

       

      Here is a links that might help too:

      http://geekswithblogs.net/erwinai/archive/2006/06/20/82474.aspx

       

      Hope this helps.

      • #19783

         

        Hi,

        I have
        following scenario,

        I want to
        extract the attachments from mail, I want to count the number of attachments
        and their type, for me type should be .pdf.

        If number
        of attachments is greater than 1 or less than one I have to send an email
        notification for that I have a .net component. And if number of attachment equal
        to 1 then I have to extract the same and put it to some location and at the
        same time create one xml file which contains mail information.

         

        can you please help me out.

        • #19784

          Check out this article by Stephen Thomas on handling emails with an indeterminate number of attachments: 

           http://www.biztalkgurus.com/blogs/biztalk/archive/2006/08/08/How-to-Split-Received-Email-Attachments-in-BizTalk-2006.aspx

          Typically mail is received as a multipart message, one part for the body and one part for each attachment.

          If you need data from the message body you need some way of parsing this info. Maybe a flatfile disassembler in the receive pipeline

          If you need info from the SMTP header (such as To, From, Subject, etc) then this is included in the message context as properties  – depending on the adapter you are using. The Biztalk POP3 adapter is not available until Biztalk 2006, with 2004 you need an open source version. Not sure where it is anymore. 

           

          • #19787

            hi,

            i have just gone thrugh the smaple from the link, but my question is how to count the number of attachements and the type of attachemnts in the email i am not able to do that can you please help me.

             

             

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