XI Mail Adapter: Sending an XML attachment
Hi
I want to send an xml attachment using the XI Mail adapter. I have configured the adapter correctly and am currently receiving the email message.
My issue is that my attachment has a .txt extention and I want it to have a .xml extn.
I have seen a variety of web blogs around but none of these have helped.
I have also changed my configuration from XIPAYLOAD to XIALL and still cannot get my payload message as a .xml attachment.
When I config my adapter to use XIALL i get 2 attachments, a SOAP.xml and the my payload wiht the filename:
[email protected]
When I use XIPAYLOAD, with the keep attachment option ticked, I get an attachment with a .txt extn.
I am convinced there must be a J2EE setting or maybe a ABAP config paramter that I need to update to get the .xml extn.
Any help is greatly appreciated.
Regards
Yackeen
Hi Yackeen,
You can use localejbs/AF_Modules/MessageTransformBean
You have to set the parameter :
Transform.ContentDisposition as
attachment;filename=myFileName.xml>
Best regards,
Bela
Similar Messages
-
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?
-
Hi,
I need to use Mail Adapter Sender with MAPI protocol.
I have create my Comunication Channel of type IMAP4 and configured URL as mapi://server and actved one.
In RWB appears the message "mail client job stopped completly"
Can anybody help me?The URL must be: imap://server/inbox
This is hard coded in the mail adapter and cannot be changed.
Only imap4 and pop3 are supported.
Regards
Stefan -
Sender mail adapter sending xml attachment comes with .bin
Hi all,
I have the following scenario: Sender Mail >> RFC
As I can receive multiples attachments I´m using payload swap bean and adapter module to get all attachments together in the first attachment.
In most cases is working very well, but in some cases the xml attachment is coming as a ".bin".
The same mail with this wrong format, when it´s been forwarded, comes with the right xml file so I can figure that is the mail format sent by vendor.
I tried to simulate this error myself and I could observe that when I change the message format from html to plain text in my outlook I get the same error, the attachments comes as .bin
Does anyone know how can I receive those mails in the right format?
Thanks for your help!
VanessaHi Ravi, thanks for your help.
I have configured:
TRANSFORM > swap.keyName > Content-Disposition
TRANSFORM > swap.keyName > Content-Description
TRANSFORM > swap.keyName > attachment;filename="MailAttachment-1.xml"
TRANSFORM > swap.keyName > MailAttachment-1
When the mail comes as html format is working fine, but not working when comes as plain text.
Any Idea?
Regards
Vanessa
Edited by: Vanessa Balsanelli Zocaratto on Nov 25, 2009 5:10 PM -
Sender mail adapter - filter emails by attachment?
Dear experts,
I have a sender mail adapter that picks an XSL (EXCEL) attachment from an incoming email and converts it (with a custom adapter module) to XML.
But now how can I make the adapter only process emails with XLS - attachments? In that Inbox I also have emails with HTML-attachments for example. And now my adapter also wants to process those messages.
In my adapter module that makes XLS to XML I see an exception in RWB but the message still gets through to SXMB_MONI where it gets stuck with a red flag.
Can I somehow tell the adapter to only process emails with XLS attachments?
Or can I stop the processing in the adapter module that converts XLS to XML?
Thank you for any input or ideas on this!
Best regards,
Peter
PS: I am using this code to convert XLS to XML:
http://wiki.sdn.sap.com/wiki/display/ABAP/AdapterModuleToReadExcelFilewithMultipleRowsandMultiple+ColumnsHello ChizzT,
Thank you for your idea. I went with this one and it worked.
Best regards,
Peter -
Mail Adapter Send Mail with Attachment
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
OlliOliver,
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>[email protected]</From>
<To>[email protected]</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 -
Receiver Mail Adapter message with PDF attachment
Hi.
We are trying to generate emails from the mail adapter that includes the plain text in the body of the resulting email and an attached PDF file. We receive the following structure:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:newMailRequest_MT xmlns:ns0="http:/pdk/sap/TorstenTest">
<Sender/>
<Receiver/>
<BodyContent/>
<Subject/>
<Attachment/>
</ns0:newMailRequest_MT>
I have set up an interface and mail adapter to be able to produce emails with plain text in the body. I used SAP note 748024 for this.
So right now I can make XI send emails with dynamic mail addresses. My problem lies in sending attached files with the mails as well.
I have read most of the threads in here, but none of them seem to answer just how to include the attachment. Which field in the 'Mail' message type is used for the attachment??
What needs to be added to the communication channel and adapter for it to include attachments, while the body of the mail still keeps the plain text message??hi
I have used the following links to send the file as an attachement and as payload.
so it may help u.
links:
/people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure - Mail Adaptor options , mail attatchment
Sender mail adapter - PayloadSwapBean - Step by step - https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6d967fbc-0a01-0010-4fb4-91c6d38c5816
/people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
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/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter
points if helpful.
regards
sreeni -
Mail adapter - content coming as attachment
Hellow experts,
I am sending data from R3 to emails using mail adapter. I am using the follwoing mail package format.
<?xml version="1.0" encoding="UTF-8" ?>
<ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">
<Subject>Water Catchment Form</Subject>
<From>[email protected]</From>
<To>[email protected]</To>
<Reply_To>[email protected]</Reply_To>
<Content_Type>text/plain</Content_Type>
<Content>You have work order(s) !!</Content>
</ns1:Mail>
In my mail adapter, I have ticked
Use Mail Package Format and
Keep Attachments
I am getting the content as an attachment - I want it inside the email.
The attachment is coming with a name Untitled.pdf - I need the actual name.
Am I missing anything?
What can I do to get things right?
ThnxHi Sabbir
refer this Pdf may be helpful for u
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9e6c7911-0d01-0010-1aa3-8e1bb1551f05
Thanks!! -
XI Mail Adapter TXT file as attachment
Hi, I am using Mail Receiver adapter to receive data from Sender ABAP Proxy.The attachment file contains data with all Labels, i used in the Target Message Type.
<?xml version="1.0" encoding="UTF-8"?>
<ns0:XogisticsOB_MT1 xmlns:ns0="http://selectcomfort.com/sapcrm/xogistics/outbound"><HEADER1000><EDI_HEADER_STR></EDI_HEADER_STR><TASK_ID>8000001959</TASK_ID><TOT_BOXES> 1</TOT_BOXES><NAME_LAST>Di Capri</NAME_LAST><NAME_FIRST>Sheela</NAME_FIRST>
Please let me know how can i exclude these labels such as
<HEADER1000> </HEADER1000> , <TASK_ID></TASK_ID>,
<NAME_LAST></NAME_LAST> etc...
from appearing in the File Content.
The ModuleKey contains
Transform.ContentDisposition attachment;filename="Outbound1.txt"
Transform.ContentDescription Outbound1
Transform.ContentType text/txt;name="Outbdound1.txt"
Thanks.
RushikeshHi,
If ur using the mail adapter as receiver then if u dont use mail package then the attachment will come as it is file.
If u use mail package then it will come in XML format
for reference please check some links.
Receiver Mail Adapter.
/people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
eMail Reporting
eMail Report as Attachment (Excel/Word)
The specified item was not found.
The specified item was not found.
The specified item was not found.
Regards,
Phani -
Receiver Mail Adapter sending Attatchments to dynamic recipients
Hi,
I am using a Receiver Email Communication Channel. I need to be able to send emails to dynamically assigned recipients. I know I need to use the 'Use Mail Package' option. I am doing this and it is working. However, I also need to attatch the payload to the email. This will work by not specifying the 'Use Mail Package' option. I need to do both.
I can send an email with an attatchment. But the content of this attachment has been generated by a Message Mapping. I want the payload on the attchment.
Thanks
MartinHi Martin,
when you use the Mail Package format and assign your payload to the <Content> Element, it should be send as an attachement.
<?xml version="1.0" encoding="UTF-8"?>
<p2:Mail xmlns:p2="http://sap.com/xi/XI/Mail/30">
<Subject>My Mail</Subject>
<From>[email protected]</From>
<To>[email protected]</To>
<Content_Type>text/xml;name="MyContent"</Content_Type>
<Content>...</Content>
</p2:Mail>
Hope this helps
Thomas -
Configuring the mail adapter Sender
Hi Guys, hope you are fine.
I have a doubt: is it possible to configure, how many emails the sender mail adapter takes per polling?
I have an inbox with more than 300 emails and I have a sender mail adapter configured with a 10 minutes pooling and I need to limit the number of messages or, just to have an ideia about the number of messages it takes. Does it depends of the machine or something like that?
Any kind of help is welcome... =)
Thank you
Luciana RossanHi Luciana,
Please refer to the FetchLimit option, described in SAP Help for sender mail adapter, it matches your requirement perfectly:
IMail.FetchLimit
You can set this additional parameter to restrict the number of mails fetched by sender mail adapter in one polling interval.
Sometimes the mailbox configured for the sender mail adapter contains large number of unread mails, which exceeds the average expected number of mails in one polling interval. In such a case, processing of all the unread mails in the same polling interval by sender mail adapter degrades the system performance. To avoid this, set value of this parameter to the maximum number of mails to be fetched and processed in one polling interval. The remaining mails exceeding the limit would be processed in the next polling interval.
Please refer to the help itself if further details required:
http://help.sap.com/saphelp_nwpi711/helpdata/EN/48/3276dba3af58d8e10000000a421937/content.htm
Hope this helps,
Greg -
Receiver Mail adapter - Text as a attachment
HI folks,
These are my screen shot link of my receiver CC
http://farm4.static.flickr.com/3279/2946574549_aa08b8464c_o.jpg
http://farm4.static.flickr.com/3063/2946575933_e8689c240d_o.jpg
In my receiver Communication channel,
I mentioned these parameters also,
From : xxxxATxyz.com ( i could not at the rate symbol ..bec it considers as a email)
to : sapATmye.com
subject: test
Content encoding: none
I am mailing with in network only
I could get email in my receiver (sapATmye.com ) inbox but only i am getting message in text format only.
I could not get as a the attachment.
I want the output in text format as a attachment
My advanced thanks for the inputs.
Thanks
PrabaharanHI Gaurav,
I am getting the error ( i tried like as u said) . even i tried that way before also ( i got the same error)
I am getting the error RWB , CC monitoring,
Message processing failed. Cause: com.sap.aii.af.modules.conversion.xml2plain.ConversionException: Insufficient number of fields read for structure SalesEmployee. Expected 4, got 3 at XML element MT_Receiver,SalesEmployee
Even link for Receiver CC
http://farm4.static.flickr.com/3289/2947598091_6dc5423a82_o.jpg
I do not know why i am getting this kind of error even though,
i mentioned SalesEmployee.fieldLengthExceeded ; = ignore
in my receiver message type 2 attributes has occurence as 1 to unbounded, another 2 attributes occurence as 0 to unbounded
Thanks
Praba
Edited by: Prabaharan on Oct 17, 2008 3:04 AM -
Export a short clip from FCE to mail and send as Email attachment
I have been trying to export short clips from FCE to mail. I have been getting as far as saving it as an attachment to an Email.
I have not been able to successfully deliver it to somebody. Is that a problem with my server or are my settings or the format I am using to send it incorrect ? What are the best and safest settings to choose from so the email goes through ?
I have send video clips directly from Quicktime files. Its working well and fast with no delivery problems. What am I doing wrong with FCE exports to mail ?
G4 PowreBook Mac OS X (10.4.8)
G4 PowreBook Mac OS X (10.4.8)well it may not be how your exportinging it. what you need to find out is how big of a file will you service provider let you send. your file may be over the limit, so all you need to do is compress it even smaller. when i send a clip i don't use the mail setting i just compress it my self as small as i can. my provider will only let me send up to 10Mb files only.
-
Hello @all,
ich get EMails from the sender channel. the relevant data are contains in the content TAG. How can i separated the content to an another XML-structure and to the mapping interface.
best regardsHi Anton,
I think this can be done without Java or XSLT mapping,
Make occurence of target message 0......unbounded in message mapping.
and duplicate Messge1 node.
Now in first Message1 do the normal mapping
In Second Message1 (Duplicated) map the Content of source to content of target and use Adavanced interface determination in ID.
This will create two XML file ,One with Normal Data and other with only content
<removed_by_moderator>
Please read the "Rules of Engagement"
- Do not ask for points - This forum should be firstly about information exchange; points are an incentive and a way of saying thanks.
Asking for points is like asking someone to say "thank you": The only time we do this in real life is when teaching a child good manners. Saying it to an adult is insulting, so why do it in the forums? If someone keeps asking questions without awarding points, simply stop answering them or use the abuse button to report it.
Thanks
Sunil Singh
Edited by: Juan Reyes on Jul 29, 2008 12:54 PM -
Sender Mail adapter encounters MalformedInputException
I have a sender mail adapter that processes the attached .csv file. All is working fine. I use FCC in module to convert the attachment and pass to an IDOC adapter for processing in SAP system.
My problem is sometimes the sender mail CC fails with ...........
exception caught during processing mail message[1]; com.sap.aii.af.mp.module.ModuleException: Transform: failed to execute the transformation: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException caused by: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
It only fails with some files. At the moment when we test we FORWARD the email to our email account. If I detach the failed email attachment and attach it to a NEW email it will then work.
So why does it not work when forwarding emails? But it works when I attach the same file to a new email and send?
Other threads for this error seem to point to encoding. But how do I know which to use. I currently use the following in my module config:
Transfer.ContentType application/octet-stream;charset="ISO-8859-1"I have this in my configuration:
localejbs/AF_Modules/PayloadSwapBean on local
TRANSFORM
localejbs/AF_Modules/MessageTransformBean on local
txtxml
TRANSFORM swap.keyName payload-name
TRANSFORM swap.keyValue MailAttachment-1
txtxml Transfer.ContentType application/octet-stream;charset="ISO-8859-1"
txtxml Transform.Class com.sap.aii.messaging.adapter.Conversion
txtxml Transform.ContentDescription MailAttachment-1
txtxml Transform.ContentDisposition attachment;filename="MailAttachment-1.bin"
txtxml xml.conversionType SimplePlain2XML
txtxml xml.documentName MT_BCD_INVOICES
txtxml xml.documentNamespace urn://federalmogul.com/BCDTRAVEL/FINGLOBCD001/00
txtxml xml.fieldNames COST_CENTRE,EMPLOYEE_ID,PRODUCT_GROUP,COMP_CODE,BCD_ACCOUNT,INVOICE_DATE,TRAVELER_NAME,TRAVELER_FIRST_NAME,INVOICE_NO,AMOUNT_EXCL_VAT,CURRENCY1,AMOUNT_VAT,CURRENCY2,AMOUNT_DOC_CURRENCY,CURRENCY3
txtxml xml.fieldSeparator ;
txtxml xml.lastFieldsOptional YES
txtxml xml.processFieldNames fromConfiguration
txtxml xml.structureTitle RECORDSET
Maybe you are looking for
-
Compensation handler and compensate activity doesn't work
Hi! i'm trying to build process with compensation handlers and it doesn't work .. to test it i made the following example: in scope_1 there is simple assign_1 and in compensation handler there is assign_2. after scope_1 i throw error and in catchAll
-
How to map journal fields and whats is the better process type
/Journal/JournalSuspenseCostCentre NULL /Journal/JournalBalancingCentre Lookup from Organisation ID /Journal/JournalMultiCompany u2018Nu2019 /Journal/JournalBatchNumber NULL /Journal/JournalNumTransactions Total number of /Journal
-
EBS - Customer Clearing Criteria
Dear Experts, My customer would like to know the criteria used by the current system to match the incoming payment in FEBP. I understand that an algorithm logic or user exit is used for this purpose. How can find out the logic currently used in the s
-
Running custom packages within BPC 5.1
Hi, Current Enviroment: BPC Ver: 5.1 SQL Server: SQL 2005 I have used earlier versions of BPC 5.1 which used SQL 2000 as a back end and was able to utlise functionailty within the EVMODIFYSCRIPT object to perform certian SQL based tasks such as creat
-
Redirect the refcursor output of an SP to a table ?
hi. i have an SP which returns a refcursor. now what i need is to get this output to a table so that i can manupulate the data. this is how i executed the table var a refcursor exec packagename.spname(:a,'inputchar'); print :a; please help. i tried c