on 09-08-2009 5:18 AM
I have a requirement where I want to send a mail with a PDF attachment to a dynamic email address via XI. So far I've set up a scenario where I'm using the XI receiver mail adapter with the 'Use Mail Package' and 'Keep Attachment' checkboxes ticked. I'm also using a UDF in the IR to populate the mail package.
This setup works fine if I send the mail within our company network (via outlook). However my issues arises when I send it out of the network.
For example
From Outlook to outlook - Message is sent successfuly with 1 attachment ('file1.pdf').
From Outlook to hotmail - Message is sent successfully but with incorrect attachments. The mail is received with 2 attachments, 'file1.pdf' (which throws an error message when I try to open it) and an 'untitled.xml' which works if I change the extension to pdf.
I'm confused as to why it works within the company network and not outside. Is there any other cofig I need to complete?
Any help would be greatly appreciated.
Cheers.
Hi Nilusha,
Can you please confirm if the Message protocol you are using is "XIALL"? In case you have to just pass the attachment from the incoming mail, try using "XIPAYLOAD" as the message protocol. Do let me know if it works.
Thanks,
Sidhartha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm using the XSD from note 748024 and using XIPAYLOAD. Payload ABC is the PDF file which comes throgugh as 'untitled.xml'.
Payload DEF is the mail package which comes through as 'file1.pdf'.
So really these two payloads need to be swapped. I have tried MessageTransform and PayloadSwap Beans to no avail.
If it helps here's the MIME header for the external mail -
Date: Mon, 7 Sep 2009 00:25:22 -0000
Subject:
To: external mail address
From: network mail address
MIME-Version: 1.0
Message-ID: <EXCHANGE*************>
X-OriginalArrivalTime: 07 Sep 2009 00:25:20.0024 (UTC)
FILETIME=[AE844180:01CA2F51]
Content-Type: multipart/mixed; boundary="boundary-1"
Return-Path: network mail address
--boundary-1
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Note: This message contains information intended only for the use of the addressee.
--boundary-1
Content-Type: multipart/related;
boundary=SAP_ee2a13f1-9b44-11de-9995-faf2f3f1f3f2_END;
type="multipart/mixed";
start="payload-DEF"
--SAP_ee2a13f1-9b44-11de-9995-faf2f3f1f3f2_END
content-id: payload-DEF
CONTENT-DISPOSITION: attachment; filename="file1.pdf"
Content-Type: multipart/mixed; boundary="--AaZz"
CONTENT-DESCRIPTION: file1
Content-Transfer-Encoding: binary
-
AaZz
Content-Type: text/plain; charset=UTF-8
Content-Disposition: inline
body
-
AaZz
Content-Type: application/pdf; name="file1.pdf"
Content-Disposition: attachment; filename="file1.pdf"
--SAP_ee2a13f1-9b44-11de-9995-faf2f3f1f3f2_END
content-id: payload-ABC
content-type: application/xml
Content-Disposition: attachment;filename="Untitled.xml"
Content-Transfer-Encoding: binary
Edited by: Nilusha Perera on Sep 9, 2009 12:23 AM
Actually the multiplart/related isn't something i've included in the mail package. It seems to be added by outlook automatically. However this only happens if I use a mail package. If I don't use mail package, the multipart/related won't get added and the attachment comes through successfully in the external mail.
The mail package I've written up looks as below, can you please advice if i've written anything wrong here?
-
<?xml version="1.0" encoding="UTF-8" ?>
- <ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">
<From>email address</From>
<To>email address</To>
<Content_Type>multipart/mixed; boundary="--AaZz"</Content_Type>
<Content>----AaZz
Content-Type: text/plain; charset=UTF-8
Content-Disposition: inline
body
-
AaZz
Content-Type: application/pdf; name=file1.pdf
Content-Disposition: attachment; filename=file1.pdf
</Content>
</ns1:Mail>
-
Thanks Very much.
I don't think that you can use Mailpackage for a binary like PDF.
You do not supply the pdf inside the Mailpackage, so this part of the message is empty.
You also have checked the attachment flag, so you have this multipart/related which is generated by the mail adapter.
I think you should avoid Mailpackage and set the conenttype for the attachment name with help of an adapter module.
Stefan
I'm using mail package because i need to use a dynamic mail address and filename. Therefore is it possible to do this without a mail package?
Also since I don't know the filename until runtime, I can't use the MessageTransformBean to set the contenttype and filename. Therefore is it possible to build a module to set the content type at runtime?
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.