Receiver Mail Adapter, Mail Package with Payload as Attachment
Hi Everyone,
I have spent the better part of the day today searching and testing all of the different combinations that I could think of to solve this problem, so please don't just do an SDN search for me and cut/paste in the links as there are too many contradictive answers piling up over the last year.
I am trying to use a Receiver mail adapter to send some data using the mail package, and I want to have the <content> tag be in an attachment. I am using mail package to dynamically set the mail address, but to also try and turn my data into a csv file that the recipient can open in Excel.
My mail package sets the following values:
<Content_Type>text/plain</Content_Type>
<Content_Disposition>attachment</Content_Disposition>
<Content>Sample Text</Content>
This blog is basically what I am trying to do:
<a href="/people/community.user/blog/2006/09/08/email-report-as-attachment-excelword:///people/community.user/blog/2006/09/08/email-report-as-attachment-excelword
But no where in here is he setting ContentDisposition, and he is (potentially) not using the MessageTransformBean module.
It is unclear if I need to use the MessageTransformBean to make this work?
Questions:
1) Do I need to use the MessageTransformBean?
2) Do I need to set the ContentDisposition in the mail package?
3) Does Service Pack matter with these settings? We are on SP15 upgrading to SP18 very soon.
Thanks
Peter
Hi Peter,
try:
<Content_Type>text/plain;name="file.csv"</Content_Type>
<Content_Disposition>attachment;filename="file.csv"</Content_Disposition>
<Content>Sample Text</Content>
Regards
Stefan
Similar Messages
-
Receiver Mail adapter - mail package - mail not received
Hi guys!
I'm using receiver mail adapter and when I want to use Mail Package (subject is assign dinamically based on mapping) I do not receive the e-mail. When I switch to not using Mail Package, the mail is sent correctly..
In RWB everything seems to be ok, it says mail sent successfully... just not to my outlook
Any ideas, what could be wrong?
Thanx a lot!
OlianHi Stefan,
thank you 4 reply.. I checked it. To be sure - I copied the content of the To tag and put it into my Outlook and sent an e-mail... It has arrived
I can't understand this..
Which fields are neccessary to fill? Is from, to and content enough? I think it should be...
Thank you!
Olian -
Mail Adapter & Mail package - pb of content
Hi,
I want to send an email from XI to my mail server (Lotus) by using the Mail Adapter with option "Use mail package".
I have just succeed to send email with only <b>ONE line</b> because of field "content" which has an occurence 0..1.
How is it possible to have several lines?
When I try to duplicate field "content" or to change its occurence (0..Unbounded), then I don't receive an email?
<i>Note: Unfortunatelly, I don't know XSL / XSLT mapping.</i>If you want to have several lines, you have to put EOL within the one "content" tag like this:
<ns:Mail xmlns:ns="http://sap.com/xi/XI/Mail/30">
<Subject>Hello</Subject>
<From>[email protected]</From>
<To>[email protected]</To>
<Content>row1
row2
row3
row4</Content>
</ns:Mail>
Sorry, I can only give you an XSLT example to do this. Assume your original message payload is:
<root>
<text>row1</text>
<text>row2</text>
<text>row3</text>
<text>row4</text>
</root>
you can use following XSLT file, which you attach directly to the Mail Adapter (like described in another thread):
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes" />
<xsl:template match="*">
<ns:Mail xmlns:ns="http://sap.com/xi/XI/Mail/30">
<Subject>Hello</Subject>
<From>[email protected]</From>
<To>[email protected]</To>
<Content><xsl:apply-templates/></Content>
</ns:Mail>
</xsl:template>
<xsl:template match="text">
<xsl:value-of select="."/>
</xsl:template>
</xsl:stylesheet>
Regards
Stefan -
In Receiver Mail Adapter ,how to ignore SOAP Header attachment
HI Folks,
Am using Receiver Mail Adapter and am getting 2 attachments.
1. one is Soap header which contains Control records
2. payload
I want only Payload as attachment and need to ignore SOAP Header(AT00001.xml).
The configuration is as below:-Trasport protocol : SMTP
Message Protocol: XIALL
Please provide Inputs.
Thanks & Regards
Ashok ReddyHi Gagandeep,
Scenario: File------>mail( Bypass scenario)
i had posted file in FTP and am getting attachment properly but aditionally am getting ATT00001.xml as SoapHeader.this i need to ignore.
PFB Module Parametrs i used:
localejbs/AF_Modules/MessageTransformBean LocalEnterpriseBean transform
Modulekey Parameterattribute value
transform Transform.ContentDisposition attachment;filename=”Pocr_860.txt”
transform Tansform.ContentType text/plain
Regards
Ashok -
XI Mail Adapter: sending emails with attachment with help of java mapping
Hi ,
On trying out the scenerio mentioned in the blog, using the java mapping provided
"XI Mail Adapter: An approach for sending emails with attachment with help of Java mapping
The scenerio works just fine.
But the payload as the content of the attachment is not getting generated in proper XML format.
I suppose it's because of the replace special characters code part..
Can anyone help me state the modification required in the code.
Thanks!
Regards,
Faria MithaniIt might be a codepage issue. Is your original payload UTF-8?
-
Receiver Mail Adapter - Mail body as attachment
Hello friends,
I have scenario = File -> XI -> Mail
The scenario is working but the problem is body of the email is coming as attachment in the mail client.(outlook express)
Is there any way to avoid the body coming as attachment.
Regards
Ramesh PHi Ramesh,
You can use the MessageTransformBean in the receiver mail adapter for this.
Refer this for the parameters which you can use
http://help.sap.com/saphelp_nw04/helpdata/en/57/0b2c4142aef623e10000000a155106/content.htm
Regards,
Chandra -
E-mail adapter : dynamic recipient with an attachment
Hi,
I read the weblog from Michal Krawczyk about implementing
of dynamic recipient of e-mail adapter.
I need this functionality and above that I need to include IDOC in e-mail message as an attachment.
Will transformed IDOC by mapping attached to created e-mail message when I check "Keep Attachments" checkbox.
Thank you.
Marian.Hi Marian,
everything what you need is possible
what would you like to know?
steps:
1. if you have sp14 put the address name in the mapping
2. attach the idoc in the attachment - standard
3. use "Keep Attachments" in the mail adapter
Regards,
michal -
Mail adapter - how to get rid of attachment
Hi XI Forum,
I want to send a simple mail notification to a user, that his/her data has passed through XI. In that connection I don't want the default behaviour of the mail adapter, which is to attach the message payload to the mail.
In other words - I want to send a mail with NO attachment.
How do I accomplish that ?Hi,
Change the Message protocol to 'XIPAYLOAD'. Make sure you uncheck the 'Keep Attachments' checkbox. This should send the email with the xml message in the body of the email with no attachments.
If you do not need the xml message in the body, you could use 'Mail Package' by checking the Mail Package checkbox. In this case, you need to have a mail package xml created with email id, subject and content (that could be custom text). For more instructions on how to do this, refer to Michal's weblog:
/people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
Regards,
Suresh. -
Mail-Adapter adds ".bin" to filename of attachment
Hi!
I'm sending mails with a dynamic generated filename using the mail-adapter and mail-package. The file extension of the attachment should be ".txt" and the content-type should be "application/EDIFACT"
When I change the content-type of the attachment in my adapter module by
TextPayload attachment = msg.createTextPayload();
attachment.setName("something_dynamically_generated.txt");
attachment.setContentType("application/EDIFACT");
The content-type is changed properly, but the file extension ".bin" is added.
The result is in my example:
something_dynamically_generated.txt.bin
How can I stop XI from extending my filename?
I tried with the MessageTransformBean, but it had no effect.
Best regards,
DanielHi Sudharshan,
we upgraded from SP15 to SP18, then the problem occured no more.
I created the attachment in an adapter-module for the mail adapter. Sample code:
TextPayload attachment = msg.createTextPayload();
attachment.setContentType("Application/EDIFACT");
attachment.setName("SomethingDynamicallyGenerated.txt");
attachment.setText(string_which_contains_the_new_payload);
msg.addAttachment(attachment);
It seems that the mail adapter checks now if a filename extension is given. If this is the case, it adds no extension by itself.
I tested different configurations like mail package and variable transportbinding / adapterspecific attributes, it worked every time.
Best regards,
Daniel -
Error while testing Adapter through RWB with payload
Hi all,
While testing Adapter engine through RWB with payload, i get the below error
Error while sending message: com.sap.aii.af.ra.ms.api.ConfigException: ConfigException in XI protocol handler. Failed to determine a receiver agreement for the given message. Root cause: com.sap.aii.af.service.cpa.impl.exception.CPALookupException: Couldn't retrieve outbound binding for the given P/S/A values: FP=;TP=;FS=ec6clnt001;TS=com_avaya_java_bs;AN=StartNotification_MI_sync;ANS=http://www.tcs.com/sap/xi/AVAYAPoC;"
Can any body please suggest the possible reason and solution for the same.
Regrads,
KulwantHi
verify the receiver agreement and also check it out whether receiver message interface is configured properly or not?
or
open ID and goto tools tab in that click on
test configuration by providing your Business service and interface details along with the payload it displays the error message.
regards
Suryanarayana -
Hi
In my scenario,we are sending plain request to web service using receiver sender adapter and PI will receive response as excel attachment. What are standard module required to achieve this and sequence? or checking Keep attachment box will help us to achieve this?
is it possible to receive excel sheet as attachment from receiver soap adapter ?
Thanks in AdvanceHi,
This issue might be due to the invalid .pem certificate file.
Make sure to include the beginning and end tags on each certificate.
The result should look like this:
-----BEGIN CERTIFICATE-----
(Your Primary SSL certificate: your_domain_name.crt)
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
(Your Intermediate certificate: DigiCertCA.crt)
-----END CERTIFICATE-----
For more detailed information, you could refer to:
https://www.digicert.com/ssl-support/pem-ssl-creation.htm
Regards -
Outbound Mail Adapter Mail Package
Hi there,
I have a problem in a XI-Scenario.
There is an incoming mail with a CSV-File as an attatchemant.
It s transformed by an itemfield-module into xml-soap.
Then the message is mapped and end to a sap-hr via rfc.
This is how far it works.
my problem is, that i need the emailheaddata, and i dont know how to get it. The atribute 'use mail package' is activated. but how can i reach the information from the mail package in the mapping where i need the information about the sender?
best regards
Harald Cremerhi,
if you won't be able to do it in amy other way try this:
create an adapter module in which you will
get the header data
and put it into the dynamicconfiguration
then you will be able to get it from your mapping
easily
Regards,
michal
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a> -
Receiver Mail Adapter configuration Error???
Hi,
i've created a Mail Adapter with the following configuration:
Adaptertype: Mail
Receiver
Transport-Protocol: SMTP
Message-Protocol: XIPAYLOAD
Adapter-Engine: Integration-Engine
I set From and To Fields to a valid address. When i start a test the message is passing the integration engine and an error occurs within the mail-adapter:
Mail: Configuration error: Channel 7a15b118b96b392bbc9be5922f55b7d0is not configured for XIMailAdapter
Mail: call failed; com.sap.aii.af.ra.ms.api.RecoverableException: Error: invalid XIMailAdapter channel 7a15b118b96b392bbc9be5922f55b7d0
How can this happen?
regards
msHi,
Reffer these BLOGS
/people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter
/people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1685 [original link is broken] [original link is broken] [original link is broken]
/people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
http://help.sap.com/saphelp_nw04/helpdata/en/3c/b4a6490a08cd41a8c91759c3d2f401/content.htm
<u><b>Target Structure:::::</b></u>
- <xs:schema targetNamespace="http://sap.com/xi/XI/Mail/30"
xmlns:xi="http://sap.com/xi/XI/Mail/30"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <!--
Mail
-->
- <xs:element name="Mail">
- <xs:annotation>
<xs:documentation>Mail package for XI - Mail Adapter</xs:documentation>
</xs:annotation>
- <xs:complexType>
- <xs:sequence>
<xs:element name="Subject" type="xs:string" minOccurs="0" />
<xs:element name="From" type="xs:string" minOccurs="0" />
<xs:element name="To" type="xs:string" minOccurs="0" />
<xs:element name="Reply_To" type="xs:string" minOccurs="0" />
<xs:element name="Content_Type" type="xs:string" minOccurs="0" />
<xs:element name="Date" type="xs:dateTime" minOccurs="0" />
<xs:element name="Message_ID" type="xs:string" minOccurs="0" />
<xs:element name="X_Mailer" type="xs:string" minOccurs="0" />
- <xs:element name="Content" minOccurs="0">
- <xs:annotation>
<xs:documentation>any type</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="encoding" type="xs:string" />
</xs:complexType>
</xs:element>
- <xs:element name="MailReceipt">
- <xs:annotation>
<xs:documentation>Mail Receipt for XI - Mail Adaper</xs:documentation>
</xs:annotation>
- <xs:complexType>
- <xs:sequence>
<xs:element name="Server" type="xs:string" />
<xs:element name="Format" type="xs:string" />
<xs:element name="UseMailPackage" type="xs:boolean" />
<xs:element name="Encoding" type="xs:string" />
<xs:element name="Subject" type="xs:string" minOccurs="0" />
<xs:element name="From" type="xs:dateTime" minOccurs="0" />
<xs:element name="To" type="xs:string" minOccurs="0" />
<xs:element name="Date" type="xs:dateTime" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Regards
Seshagiri -
How to change content-type in receiver mail adapter
Hi,
I have receiver mail adapter for sending XML file as attachment in the mail. My partner expects to receive mail with content-type: text/xml, but XI sends Content-Type: application/xml. Please advise how I can change content-type to text/xml.
Thank you
Levhi,
try MessageTransformBean
Transform.ContentType
http://help.sap.com/saphelp_nw04/helpdata/en/57/0b2c4142aef623e10000000a155106/content.htm
also shown in my blog:
/people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter
Regards,
michal
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a> -
Hi,
I have to send a flat file as attachment through the mail adapter in combination with the mail package because I have to communicate with several partners and I want to determine dynamically the "To:" depending on a field in the source structure (an IDoc).
The scenario is almost complete. I've created the file as mail attachment using the MessageTransformBean module and it works fine but how can I map the xml structure needed for the mail package?
I've already check the following weblogs but I didn't find the answer to my question.
/people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
/people/srinivas.reddy/blog/2005/02/11/model-driven-architecturemda-for-dummies
Thank you!
Ciao
StefanoHi Stefano,
Refer to the How-to Guide on Mail Adapter at the below link.
https://websmp103.sap-ag.de/~form/sapnet?_SHORTKEY=01200252310000071155&_SCENARIO=01100035870000000202&_OBJECT=011000358700004556712005E
Rgds,
Sam Raju
Maybe you are looking for
-
HP Color LaserJet 2600n issues
If someone could assist me I would truly appreciate it. I have an HP Color LaserJet 2600n that has been installed on my network (I inherited it 2 years ago) and has been working without any issues. We recently moved our print server to a new server
-
Fix blurry images downloaded from Safari (The semi-easy way)
Hi, I've noticed a couple of people around here have had problems with image quality (blurry images) whenever an image was saved to the camera roll from Safari. Turns out, there is a simple fix for this! This fix requires a drawing app such as Brushe
-
Gluegen wrapper returning String or Array
How can I setup a wrapper function to return a String or Array. In my wrapper.gg file I'd like to have something like: public function mystrcat(str1:String, str2:String):String char *ret = strcat(str1, str2); return ret; public function myarrayfunc()
-
Basic query regarding work-area and select query
hi dear sdn members, thanks too all for solving all my query's up till now i am stuck in a problem need help 1) why basically work-area has been used ? the sole purpose 2) different types of select query ? only coding examples note: no links pls re
-
Can't find wfaqupfix.sql
hi ! Iam upgrading the database from 11.1 to 11.2.x in EBS12 on solaris sparc 64bit. I am following the post install steps as stated in document id 1058763.1 and got stuck on step 21 cause the $FND_TOP/patch/115/sql/wfaqupfix.sql file is missing. tha