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?
Hi,
You need to check with your Network Administrator, if there are any security constraints for outside mail communication.
Thanks
Swarup
Edited by: Swarup Sawant on Sep 8, 2009 6:50 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the quick response Swarup.
I have tried sending the same mail package to another external email address and the result is the same. The email gets sent successfully but with the incorrect attachments.
I will post the MIME headers which will hopefully help....
Network Email (works as required and sends mail with 1 pdf attachment)
-
Microsoft Mail Internet Headers Version 2.0
Received: from xi**dev ([192.168.10.20]) by EXCHANGE1.***.au with Microsoft SMTPSVC(6.0.3790.1830);
Tue, 8 Sep 2009 16:00:53 +1000
Date: Tue, 8 Sep 2009 06:03:29 -0000
Subject:
To: network email address
From: network email address
MIME-Version: 1.0
Content-Type: multipart/related; boundary=SAP_54895cc1-9c3d-11de-c0f3-faf2f3f1f3f2_END; type="multipart/mixed"; start="payload-ABC"
Return-Path: network email address
Message-ID: <EXCHANGE1SPEUtPWGEm000000c5*************>
X-OriginalArrivalTime: 08 Sep 2009 06:00:53.0546 (UTC) FILETIME=[B971A8A0:01CA3049]
--SAP_54895cc1-9c3d-11de-c0f3-faf2f3f1f3f2_END
content-id: payload-ABC
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
-
AaZz
Content-Type: application/pdf; name=file1.pdf
Content-Disposition: attachment; filename=file1.pdf
Hi,
Your MMIE contents looks fine...This is really weird as you are getting the attachment within Network.
I think the MMIE content types & XMl format type are not acceptable while sending the mail to external mail server.
Can you check the format of this mail package XML document -- 748024 & 856599
Thanks
Swarup
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.