on 04-13-2005 6:41 PM
Hi all,
I'm doing some tests on XI and implemented a little scenario, that send Mails.
So this works fine, but I want to have the content as the content of the mail (no prob) and a attachment with a little more information for the user in a plain text file.
I tried to code it with content-type multipart and all these stuff, but didn't come to a solution.
Some one solved such a scenario already and can help?
I also read some thread on SDN, but no solution. Perhaps its to simple
Thanx
regards
Olli
Oliver,
We have found the solution for you.
You should configure the mail adapter with 'use the mail adpater' and 'keep attachments'.
Create an XML file conform the XML structure provide by SAP
The mail package should look like this:
<?xml version="1.0" encoding="utf-8"?>
<ns:MT_Mail_Sent xmlns:xi="http://sap.com/xi/XI/Mail/30">
<xi:Mail>
<Subject>Item</Subject>
<From>Mister.A@dummy.nl</From>
<To>Misses.B@dummy.nl</To>
<Content_Type><b>multipart/mixed; boundary="AaBb--984dfgeSSd3532"</b></Content_Type>
<Content_Disposition>attachment</Content_Disposition>
<Content>
<b>AaBb984dfgeSSd3532</b>
Content-Type: text/plain
Hello, this is sample data.
<b>AaBb984dfgeSSd3532</b>
<b>Content-Type:</b> text/plain;name="CSV_data.csv"
Order number;Item number;description<xsl:text>
</xsl:text>
<xsl:for-each select="Article_line">
<xsl:value-of select="Ord_nmbr"/>;<xsl:value-of select="Item_nmbr"/>;<xsl:value-of select="Description<xsl:text>
</xsl:text></xsl:for-each>
<b>AaBb984dfgeSSd3532</b>
<b>Content-Type:</b> text/plain;name="TXT_data.txt"
Order number;Item number;description<xsl:text>
</xsl:text>
<xsl:for-each select="Article_line">
<xsl:value-of select="Ord_nmbr"/>;<xsl:value-of select="Item_nmbr"/>;<xsl:value-of select="Description<xsl:text>
</xsl:text></xsl:for-each>
<b>AaBb984dfgeSSd3532</b>
.
</Content>
</xi:Mail>
</ns:MT_Mail_Sent>
In the above example you should have some content and 2 attachments (1 csv file and 1 txt file).
After each break (AaBb984dfgeSSd3532) specify again the 'Content-Type'.
Good luck
Regards
Ron
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Yaseen,
When you want to send a message payload as described, you have to set in the mail receiver channel the parameter <i>Content Encoding</i> to <i>None</i> and uncheck <i>Keep Attachments</i>.
The last boundary <b>AaBb984dfgeSSd3532</b> should be omitted, as the mail adapter sets that border itself (tested with SP16)
Regards
Stefan
Hi Stefan,
Iam tying to setup the same scenario. I populated the Content filed as described by Ron.
Here is the code used for populating the Content field.
<Content>
AaBb984dfgeSSd3532
Content-Type: text/plain
Hello, this is sample data.
AaBb984dfgeSSd3532
Content-Type: text/plain;name="CSV_data.csv"
<xsl:for-each select="ns0:EmailRequest_MT/row">
<xsl:value-of select="content"/>
xsl:text>
</xsl:text>
</xsl:for-each>
AaBb984dfgeSSd3532
Content-Type: text/plain;name="TXT_data.txt"
<xsl:for-each select="ns0:EmailRequest_MT/row">
<xsl:value-of select="content"/>
<xsl:text>
</xsl:text>
</xsl:for-each>
</Content>
The problem is that iam not getting any csv or txt attachment files. Iam just getting an email with the following content in the email
<i>AaBb984dfgeSSd3532
Content-Type: text/plain
Hello, this is sample data.
AaBb984dfgeSSd3532
Content-Type: text/plain;name="CSV_data.csv"
Content_Disposition:attachment;"CSV_data.csv"
This is filed 1
This is filed 2
AaBb984dfgeSSd3532
Content-Type: text/plain;name="TXT_data.txt"
This is filed 1
This is filed 2</i>
FYI: In receiver email adapter Content Encoding is set to None and Keep Attachments tab is unchecked.
Can you please help.
Thanks
Pradeep
Hi,
Refer the below weblogs and help:
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1685 [original link is broken] [original link is broken] [original link is broken]
http://help.sap.com/saphelp_nw04/helpdata/en/3c/b4a6490a08cd41a8c91759c3d2f401/content.htm
/people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
Thanks and Regards,
Chirag Gohil
Stefan,
Content_Type is populated as
<i><Content_Type>multipart/mixed; boundary="AaBb984dfgeSSd3532"</Content_Type></i>
I dont see any difference between your JAVA Program and the above code. Content filed is getting populated in the correct format. Iam not sure whats going wrong here.
Do i have to do anything in the Modules tab of the Receiver Email Adapter for this scenario to work in the intended way??
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.