Home Page › Forums › BizTalk 2004 – BizTalk 2010 › SMTP adapter & attachment name
- This topic has 9 replies, 1 voice, and was last updated 9 years, 1 month ago by
community-content.
-
AuthorPosts
-
-
December 13, 2006 at 7:54 AM #16877
Hello,
I'm trying to setup a pure routine config using Biztalk to send by SMTP files that will be dropped in a share.
So I create a receive port & location FILE to collect the file from the share (Passthru pipeline), and I create a Send port / location SMTP to send the mails.
SMTP adapter is setup to have a body type "Text" enforced to a test text, and to attach all part of the messages.
The thing works Ok despite one point (apparently famous is I believe Google), the attachement name is not preserved and replace by "body.dat". Saving body.dat and renaming it with the original extension (e.g .xls of .pdf) will let the orignal soft open, so the attachement has been transmitted intact.Is there any way I can preserve the attachment name ? As per today, I have to transmit Excel through that setting.
thanks,
Chris
-
December 14, 2006 at 12:31 AM #16894
You need to copy the message context property FILE.ReceivedFileName into the message body part context property MIME.Filename.
If you are not using an orchestration, then you will need a custom pipeline component to do this.
-
July 28, 2009 at 9:26 AM #22924
I am also having the same issue. I want to retain the file name with extension ie. filename1.csv and send it as an email.
1) Receive port with File type — Pass through
2) Send port for SMTP with the below pipeline
3) send pipeline which has s/mime
An email is send with an atatchment. But not with the filename and extension.
Can anyone please provide me the steps to do achieve this
-
March 16, 2010 at 12:41 PM #24390
Greg… I know this was a long time ago, but if you are still around I would really like to know how to create this pipeline to solve this problem without an orchestration.
Seeing how this is one of the first sites that comes up in google, it would be great if a complete answer was here for all that are looking for it.
Thanks, Kiethb
-
March 16, 2010 at 12:57 PM #24391
Hi Kiethb,
Is this what you are looking for?
Daniel.
-
March 16, 2010 at 1:44 PM #24392
I have to say that it certainly appears to be. I will see if I can get this to work, but thank you for I believe others will readily find this helpful and consider this thread complete.
Great job.
-
March 16, 2010 at 2:13 PM #24393
If I may, one question that came up was that I am already using a pipeline that is using the flat file assembler… so do I need to create a custom component to incorporate the flatfile assembler code and the code in this thread to accomplish everything I need? I dont see how else to make the pipeline do everything I want since it only allows one assemble component…
Thanks
-
March 16, 2010 at 4:44 PM #24394
You create a custom pipeline component to perform the file name promotion only.
Then create a custom pipeline, and include both the Flat File Assembler component and your custom component from above. You will probably put you component in the Encode stage of the pipeline.
The pipeline will call each component in the pipeline in the order defined.
-
March 17, 2010 at 1:04 PM #24404
Hi kiethb1,
To follow up and clarify the post from Greg, you need to do two things in your custom Send pipeline artifact, after you have created, compiled and GAC’ed your custom component:
1) Load the custom component into the list of BizTalk Pipeline Components in the Toolbox area in your Visual Studio BizTalk project, and drag and drop it into the Pre-Assemble stage on the Pipeline Designer for your Send Pipeline. Modify the property settings of that component (if applicable).
2) Drag and drop the native Flat file assembler into the Assemble stage on the Pipeline Designer for your Send Pipeline. Modify the property settings of that component (if applicable).
Daniel.
-
March 17, 2010 at 3:02 PM #24407
You guys have been great. Works like a charm.
Using Xman71’s link above in conjunction with the following pipeline creation tutorial link I found elsewhere, I was able to get the desired functionality.
This is an excellent tutorial on creating a custom pipeline component if you know nothing about it at all. (ME!, until now) I will say, anyone looking to do this to make sure you use the attached code file on that page because there are some codelines that were not discussed that are in there that you will need. (the encode, decode designation etc)
From there I simply took that code, removed the contents of the Execute method and implanted the code from Xman’s link.
This should be the most concise resource to find this information in one place and hope others will benefit as well.
Thanks to all that helped me out.
-
-
-
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.