| Author |
How to attach multiple files from WSS in SMTP in BTS 2006
|
|
|
| I need to send email with multiple attachments. The attachments reside in a
document library in WSS under a sub folder. I need some guidance in the best
way of achiveving this.
The solution under consideration is to call a .Net custom class in the
orchestration and pass the message, document library + sub folder name. The
..Net custom class will create the various parts of the message and add the
attachments to it. It will get the attachments using the Sharepoint Object
model. Is this a right approach? Is there a better way of doing this?
Can anyone point to any articles on how to dynamically add multiple parts to
a message and how to configure SMTP programmatically to make this work?
I would really appreciate the help.
| |
| Adrian Hamza [MSFT] 2006-05-19, 1:15 pm |
| That's one way to do it. There are some problems with it:
- SharePoint OM is not remotable so you migt have to use HTTP/Web Services
- you might have to build in some retry mechanism.
Another possibility is to use InfoPath's ability to attach files to the
forms. InfoPath forms supports attachments. So you can have a SharePoint
form library (and an InfoPath solution). You can create a new form in this
form library, you attach the files to the form and you save it in the
library
The form (XML with files attached as base64) is saved in the form library
from where it is retrieved by WSS adapter. WSS adapter will retrieve only
one file that contains your message and the attachements.
On the BizTalk server side you will need to extract the attachements from
the XML message and build your SMTP message.
This posting is provided "AS IS" with no warranties, and confers no rights.
Adrian Hamza [MSFT]
http://blogs.msdn.com/ahamza/
My blog on BizTalk 2006
Windows SharePoint Services adapter
--------------------[vbcol=seagreen]
a[vbcol=seagreen]
best[vbcol=seagreen]
The[vbcol=seagreen]
the[vbcol=seagreen]
Object[vbcol=seagreen]
to[vbcol=seagreen]
| |
|
| Thanks for your reply and for pointing out the problems with the approach. I
may not be able to use the infopath solution as the code for adding the
documents to WSS is all in place and cannot be modified.
1. On the BizTalk side is it possible to build the message in a custom
pipeline to avoid the big attachments to flow through the orchestrations? It
would be more efficient this way but I'm not sure if we can do that.
2. As it is required to set the content type of the attachment in the multi
part message, is there a way of getting the content type by the document
extension from somewhere?
"Adrian Hamza [MSFT]" wrote:
> That's one way to do it. There are some problems with it:
> - SharePoint OM is not remotable so you migt have to use HTTP/Web Services
> - you might have to build in some retry mechanism.
>
> Another possibility is to use InfoPath's ability to attach files to the
> forms. InfoPath forms supports attachments. So you can have a SharePoint
> form library (and an InfoPath solution). You can create a new form in this
> form library, you attach the files to the form and you save it in the
> library
>
> The form (XML with files attached as base64) is saved in the form library
> from where it is retrieved by WSS adapter. WSS adapter will retrieve only
> one file that contains your message and the attachements.
>
> On the BizTalk server side you will need to extract the attachements from
> the XML message and build your SMTP message.
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> Adrian Hamza [MSFT]
> http://blogs.msdn.com/ahamza/
> My blog on BizTalk 2006
> Windows SharePoint Services adapter
>
> --------------------
> a
> best
> The
> the
> Object
> to
>
>
| |
| Adrian Hamza [MSFT] 2006-05-19, 7:13 pm |
| See this URL for MIME types http://www.iana.org/assignments/media-types/
This posting is provided "AS IS" with no warranties, and confers no rights.
Adrian Hamza [MSFT]
http://blogs.msdn.com/ahamza/
My blog on BizTalk 2006
Windows SharePoint Services adapter
--------------------[vbcol=seagreen]
<Rooz#g2eGHA.188@TK2MSFTNGXA01.phx.gbl>[vbcol=seagreen]
approach. I[vbcol=seagreen]
It[vbcol=seagreen]
multi[vbcol=seagreen]
Services[vbcol=seagreen]
SharePoint[vbcol=seagreen]
this[vbcol=seagreen]
library[vbcol=seagreen]
only[vbcol=seagreen]
from[vbcol=seagreen]
rights.[vbcol=seagreen]
2006[vbcol=seagreen]
microsoft.public.biztalk.orchestration:14514[vbcol=seagreen]
reside in[vbcol=seagreen]
the[vbcol=seagreen]
the[vbcol=seagreen]
name.[vbcol=seagreen]
add[vbcol=seagreen]
parts[vbcol=seagreen]
work?[vbcol=seagreen]
| |
| Matt Milner 2006-05-20, 1:16 am |
| You might take a look at a sequential convoy to solve your problem. This
may give you what you want in terms of getting all the messages into the
same process. From custom code you can now call AddPort on an XLangMessage
so you can dynamically add the parts to the message.
Matt
"zia" <zia@discussions.microsoft.com> wrote in message
news:204AB1F8-7821-4410-A232-CB0FADE5EFFA@microsoft.com...
>I need to send email with multiple attachments. The attachments reside in a
> document library in WSS under a sub folder. I need some guidance in the
> best
> way of achiveving this.
>
> The solution under consideration is to call a .Net custom class in the
> orchestration and pass the message, document library + sub folder name.
> The
> .Net custom class will create the various parts of the message and add the
> attachments to it. It will get the attachments using the Sharepoint Object
> model. Is this a right approach? Is there a better way of doing this?
>
> Can anyone point to any articles on how to dynamically add multiple parts
> to
> a message and how to configure SMTP programmatically to make this work?
>
> I would really appreciate the help.
|
|
|
|