Error in mail adapter whilst using 'mail package' option
Hello,
I am using receiver mail adapter. Its working fine when I do not use 'mail package option'. But when I use mail package option, this error comes in
Message processing failed. Cause: com.sap.aii.af.modules.conversion.xml2plain.ConversionException: No data is allowed on this structure level (2) at XML element Mail,Subject
This is the sample of payload:
<?xml version="1.0" encoding="UTF-8" ?>
- <ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">
<Subject>Data Update to Portal failed</Subject>
<From>sender email id/From>
<To>receiver email id/To>
<Reply_To />
<Content_Type>text/plain</Content_Type>
<Content>Error: Undefined Error</Content>
</ns1:Mail>
Any idea what should I do to get it working. Alternatively, is it possible to use the dynamic value into the email 'TO' field.
Thanks in adavance
Hi All,
I need the same info in my requirement . The Scenario is MAIL > FILE . THe Vendor sends the email with Invoices ( An Attachment) to a mail server and the attachment has to be moved to the network folder (File )
Here , I used IMAP4 Protocol in MAil Sender CC
I wanted to know is it required to use :localejbs/ AF_Modules/PayloadSwapBean and any module configuration to petch the attachment ?
Similar Messages
-
Dynamically pass subject via mail adapter without using mail package
Hi,
We have requirement to pass the Dynamic variable as Mail subject
we can't use Mail Package as we need to capture the data from Dynamic SOAP header Data from incomming channel
Dynamic SOAP Header variable (XHeaderName1) comming from Sender SOAP channel.
Receiver side we need to capture that XHeaderName1 in Mail Adapter channel using ASMA and Variable transport binding so that value of XHeaderName1 should overwrite Subject under General/ Mail Atribute section.
Could you please let me know, how to handle this requirement using module configuration?
Also suggest the correct configuration to use ASMA and Variable transport binding.
Regards
VenkyHi Venky,
Please have a look at the links below. They should help you.
Configuring the Sender SOAP Adapter- https://help.sap.com/saphelp_nw04/helpdata/en/fc/5ad93f130f9215e10000000a155106/content.htm
Configuring the Receiver Mail Adapter-https://help.sap.com/saphelp_nw04/helpdata/en/6b/4493404f673028e10000000a1550b0/content.htm
Adapter-Specific Message Attributes in the Message Header -https://help.sap.com/saphelp_nw04/helpdata/en/43/0a7d1be4e622f3e10000000a1553f7/content.htm
Regards,
Jannus Botha -
Dynamic attachment name with receiver mail adapter and use mail package
We need to send mapped XML payload as attachment (with dynamic name) to a recepient (recepient email id is part of input xml payload, but not part of the mapped XML payload).
I could probably do this using the adapter module (as per the following link),
http://wiki.sdn.sap.com/wiki/display/XI/Adapter%20Module%20PI%207.0%20Set%20Attachment%20Name?bc=true
I would like to explore if this would be feasible using Mail package and XI payload.I already have a Java mapping that is converting the input XML to required Output format. If I am using Mail package (XI Payload), how do I go about sending this Output XML from java mapping as attachment to email id available in the input payload?Hi,
1) XML payload as attachment (with dynamic name)
2) recipient (recipient email id is part of input xml payload, but not part of the mapped XML payload)
These two is possible by using Mail Package. You have a standard xsd for mail package which you can download from the SAP Note 748024.
The xml created in you java mapping which will be your attachment should be put into the <content> tag of the mail package xml structure. and the file name can be set in the <Content_Type> tag.
<?xml version="1.0"; encoding="UTF-8"?>
<p2:Mail xmlns:p2="http://sap.com/xi/XI/Mail/30">
<Subject>My Invoice</Subject>
<From>from email address<;/From>
<To>to email address</To>
<Content_Type>text/plain;name="MyFile.csv";</Content_Type> --> file name here
<Content>123;A49;aaa</Content> -> attachment xml here
</p2:Mail>
And you have to select MailPackage in the receiver mail adapter.
Regards,
Aravind -
Sender Mail adapter get no mails
Hello,
we are using the sender mail adapter to receive mails (IDOCS) from a Exchange server.
A few days it works, but suddenly no mails are received.
But in RWB the mail adapter status is green and shows, that there are no new mails. But when I check the mail box with OUTLOOK, there are some mails.
When I deactivate and activate the mail adapter, all mails are read then.
Pollinterval: 1 minute
XI: SP10
Who can help me are had s similar problem?
Or is it possible to stop/start the mail adapter (or the adapter engine) automaitcally (more like a workarround)
best regards
Werner MagerlHi All,
I chekced your responses and tried accordingly. Our basis team has given me new link now and the error message has changed. I am getting following error message.
exception caught during processing mail message; java.io.IOException: unexpected login response; read 001F BAD Command received in Invalid state.
Does anyone have any idea what this error is?
Thanks in advance,
Devendra -
Not able to create new e-mail on N8 using Mail for...
Not able to create new e-mail on N8 using Mail for Exchange.
Currently using google for my domain, but settings are the same as explained on the google Sync webpage: http://www.google.com/support/mobile/bin/answer.py?hl=en&answer=147951
When creating reply on mail the application crashes. When creating new mail it says "Kan bewerking niet uitvoeren" in english: "Unable to execute action".
Any idea why creating mail is not possible?
Regards,
Jorisproblem is known
more info there:
/t5/Nseries-and-S60-Smartphones/N8-syncing-with-Google-contacts-amp-calendar/td-p/772020
there is little workaround aslo. -
I moved to ICloud but on my main PC (IMac) I've lost all e-mails at Mail and cannot use Mail anymore as my regular e-mail. What do I have to do to synchronize with ICloud?
Please always post your system when you have a query - in this case it makes a considerable difference to the answer.
Is your system pre-Lion? Earlier systems are not compliant with iCloud but you can set Mail up manually to access your iCloud email:
Entering iCloud email settings manually in Snow Leopard or Leopard
Entering iCloud email settings manually in Tiger -
Mail Adapter: Working with mail packages
Hi All
I am having a receiver mail adapter.
I am using mail package to send data as a text file attachment.I am getting the following error:
failed to send mail: com.sap.aii.messaging.util.XMLScanException: expecting start tag: Mail, but found TM_Mail at state 1
How can i override my current namespace with the recomended namespace 'http://sap.com/xi/XI/Mail/30}Mail'??
Thanks
ChandraI am trying to use the mail package as well and no e-mail delivered. However, when I do not use the mail package an use mail attribute and remove the code below it works fine.
<?xml version="1.0" encoding="UTF-8"?>
<ns:Mail xmlns:ns="http://sap.com/xi/XI/Mail/30">
<subject>824 test</subject>
<from>edi/@/na.modine.com</from>
<to>s.m.posnanski/@/na.modine.com</to>
<reply_to>edi_support/@/na.modine.com</reply_to>
<content_Type>text/plain</content_Type>
<content>
Hello
</content>
</ns:Mail>
Can some provide the settings that are needed in the Module tab when using the "Mail Package" option?? -
Mails deleted when using Mail Sender Adapter
Hello All,
I have a Mail to XI to File scenario.
Transport Protocol: POP3
Message Protocol: XIPAYLOAD
The mail is getting converted to a xml file in the folder specified in File Adapter, but it gets deleted directly , I dont recieve any mail in my Inbox.
I have used POP3 so there is no checkbox where i have specified to delete the mails after reading.
Also another strange thing is when i try to send a mail to myself , this mail is not converted to XML and it comes to my Inbox.
Any clues why such a strange thing happens!
Thanks
MeghanaYes dear..
I will explain you the process behind it.See first the mail comes into the mail Box..for that time period you will be able to see it.Now when it gets deleted,this is time when XI has picked up your mail and processed it to give you the file.Exactly after few seconds when you refresh it (when required) you can see the xml in your target directory.
Get back if you have more doubts.
Thanks -
Sender Mail Adapter - html body mail
Hello Everybody,
I'm facing this strange problem:
I receive an e-mail with an XML attachment with a sender mail adapter and I use the PayloadSwapBean to let the attachment be the real payload as explaned in this blog
<a href="/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step:///people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
If I receive mail in text/plain format everything works fine, but as soon as I get an email with an html body (content-type: multipart/alternative; boundary=...) it doesn't any more (In the XI Monitor i still se 2 payloads, but I can only open the one with the attachment).
In this case the mapping is stuck in "scheduled for outbound process" status and the XI queue gets blocked with status "SYSFAIL" giving this error "Access via 'NULL' object reference not possible".
Is there any way to force XI digest also HTML e-mails?
As always, thanks a lot for your help.
DanieleThanks Akshay,
this really worked!
Fyi I'm using XIPAYLOAD option. I added in the module chain, before the PayloadSwapBean, a MessageTransformBean with this parameter:
Transform.ContentType - text/plain;charset=uft-8
this way I can also see the massage body in the monitornig.
Hope this will be helpful for someone else.
Regards,
Daniele -
Mail adapter issue with mail attachment
Hi all,
I have a scenario mail to file and i have a problem.
Is it possible, in a sender adapter mail to use the option keep attachment and mail package at the same time ?
So,is it possible to use the module payloadswapbean and XMLanonymizer in a sender adapter mail in order to suppress a namespace from the attachment in it ?
Is the option mail package useful if i am using payloadswapbean module ?
from what i see, It seems that the XMLanonymizer doesn't work for sender mail adapter with attachment. I've tested the configuration on a sender adapter file and works fine.
Anyone already tested it ?
Thanks,
Jean-Philippe
Edited by: Jean-Philippe PAIN on Feb 9, 2010 5:29 PMHi Stefen,
Thanks for the answers.
The question is, whether the payloadswapbean is useful at all in a sender mail scenario.
I don't understand this one ! Isn't mandatory in sender adapter mail scenario if you want to read your mail attachment ?
Yes. If you configure the payloadswapbean correct, the XMLanonymizer works on the attachment.
It is not easy to set the payloadswapbean in a correct way. IPost your parameters here, when it does not work for you.
Ok. Maybe my configuration is wrong, please tell.
Processing sequence :
localejbs/AF_Modules/PayloadSwapBean => 0
localejbs/AF_Modules/XMLAnonymizerBean => 1
sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean =>mail
module configuration :
swap.keyName =>Content-Disposition
swap.keyName => Content-Description
swap.keyValue=>MailAttachment-1
swap.keyValue=>attachment;filename="MailAttachment-1.xml"
anonymizer.acceptNamespaces =>http://namespace ''
anonymizer.quote => ''
I am on PI 7.1 version and when i am looking in the monitoring(sxmb_moni), it doesn't seems working.
Thanks,
Jean-Philippe
Edited by: Jean-Philippe PAIN on Feb 10, 2010 10:36 AM -
Receiver Mail Adapter: Formatting the mail content
Dear All,
I'm using a receiver mail adapter. I would like to format the content of the mail using the contents of the XML message. For example:
XML Message
<Order>
<OrderID>1234</OrderID>
<CustomerName>Sandeep Joseph</CustomerName>
<NetValue>7467.99</NetValue>
<Link>http://locahost:7000?OrderID=1234</Link>
</Order>
Mail Content
Dear Approver,
Please approve the Order - 1234, Customer - Sandeep Joseph
Link: http://locahost:7000?OrderID=1234
Thanks,
Are there any modules which would help formatting to this extend? Or any other mechanism?
Thanks,
SandeepThe easiest means is to use XSL mapping and create the Content Type as HTML and emded the cotent within HTML tags.
One such example is shown by Praskash in this blog,
/people/community.user/blog/2006/09/07/email-reporting
/people/community.user/blog/2006/09/08/email-report-as-attachment-excelword
If you use the Mail Package option then you can also wite a UDF in your mapping that will populate the content field. For every newline you can use the java new line \n and so on.
Regards
Bhavesh -
Receiver Mail adapter with multiple mail ids
Hi Experts,
I am doing File to Mail scenario.
I am generating mail package structure using Java mapping.
Email is not going to multiple mail ids mentioned in To field.
I tried with , and ; but for both it is behaving strange:
When using ,(coma)
in case of multiple receivers:
only last mail id will receive mail in Inbox
when using ;(semicolon)
Every email id person will receive mail but with same name listed under To: that is last mail id.
For example:
To: abc.at.test.com,xyzat.est.com,def.at.est.com
Then only def.at.test.com will receive mail
In case of semicolon(;):
Every mail id will receive mail in Inbox, that is abc.at.test.com,xyz.at.test.com,def.at.test.com
will get mail in their respective mail box, but all mails will have same TO field: def.at.test.com
I hope it is cleared.
If you want I can send outlook mail headers from outlook.
Best Regards,
DivyeshHi Divyesh
Refer the below thread. The same problem was being solved.
Mail Adapter - Multiple mail ID and multiple mail servers config.
Here is the Summery:
WRONG: receiver1@server1;receiver2@server2;
CORRECT: receiver1@server1;receiver2@server2
Regards,
Madan Agrawal -
Error to Send PDF file using mail
Hi all,
I create a report that send an mail with 2 different pdf attach.
I have a problem because one pdf attach is 663 KB and when I read it in mail it can not open the file and give me this error :
"Error opening PDF file --> There was an error opening this document.the file is damaged and could not be repareid "
I send the same mail with another PDF file (64,2 KB) and all it's work correct.
This files are in my application server, and this is the code that I use to read and send :
data: gt_table TYPE TABLE OF solix,
gs_table LIKE LINE OF gt_table.
open dataset wa for input in binary mode.
if sy-subrc eq 0.
do.
read dataset wa into gs_table LENGTH alen.
ctr = ctr + alen.
if sy-subrc ne 0.
exit.
endif.
append gs_table to gt_table.
enddo.
endif.
close dataset wa.
TRY.
(1) crea Oggetto
l_send_request = cl_bcs=>create_persistent( ).
(2) E-Mail - Crea Oggetto e Body del messaggio
(5) bcs attachment
l_attachment_size = ctr."tab_lines * 255.
CALL METHOD l_doc->add_attachment
EXPORTING
i_attachment_type = 'PDF'
i_attachment_subject = l_attachment_subj
i_attachment_size = l_attachment_size
i_att_content_hex = gt_table."xsolix[].
CALL METHOD l_send_request->set_document( l_doc ).
CALL METHOD l_send_request->set_priority
EXPORTING
i_priority = '1'.
CALL METHOD l_send_request->set_send_immediately( 'X' ).
I find this link but the problem are not resolve : Compress Smartform PDF file before sending mail
Can anyone help me to understand where is the problem ?
thanks a lot
BarbaraHi,
I find the way to resolve this topic, thanking a collegue.
The problem is the way that I use to read the file.
If I read the file in the following way, the problem concerning the size are bypassing.
DATA : gs_table LIKE LINE OF gt_table.
DATA: l_xstring TYPE xstring.
DATA : alen TYPE i.
OPEN DATASET p_p_file FOR INPUT IN BINARY MODE.
IF sy-subrc EQ 0.
DO.
READ DATASET p_p_file INTO l_xstring.
p_bin_filesize = p_bin_filesize + alen.
IF sy-subrc NE 0.
EXIT.
ENDIF.
APPEND gs_table TO gt_table.
ENDDO.
ENDIF.
CLOSE DATASET p_p_file.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = l_xstring
APPEND_TO_TABLE = ' '
IMPORTING
output_length = p_bin_filesize
TABLES
binary_tab = gt_table .
thanks a lot
barbara -
Premature end of file Problem in Mail-Adapter by using StrictXml2PlainBean
Hello Experts,
I tried a simple File to Mail scenario with the following test message and received the expected attachment:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_TEST_FlatMessage xmlns:ns0="urn:lynx.de:pi:test:bw_extractor">
<elemente>
<Kundennummer>4711</Kundennummer>
<RechnungsNr>0001</RechnungsNr>
<Umsatz>234,67</Umsatz>
<Anzahl>34</Anzahl>
<Versand>12,00</Versand>
<PosNr>0001</PosNr>
</elemente>
<elemente>
<Kundennummer>4711</Kundennummer>
<RechnungsNr>0002</RechnungsNr>
<Umsatz>1900,25</Umsatz>
<Anzahl>100</Anzahl>
<Versand>50</Versand>
<PosNr>0002</PosNr>
</elemente>
</ns0:MT_TEST_FlatMessage>
Everything is fine. Now I want to transform the message in a CSV-Attachment and joined the Module
1 AF_Modules/StrictXml2PlainBean Local Enterprise Bean 0
as first entry in the sequence with the following configuration:
Key Parameter Value
0 addHeaderLine fromXML
0 elemente.endSeparator \r\n
0 elemente.fieldSeparator ;
0 singleRecordType elemente
But now I the adapter gets the error: Premature end of file
What did I wrong?>
Dirk Koch wrote:
> as first entry in the sequence with the following configuration:
>
> Key Parameter Value
> 0 addHeaderLine fromXML
> 0 elemente.endSeparator \r\n
> 0 elemente.fieldSeparator ;
> 0 singleRecordType elemente
>
>
> But now I the adapter gets the error: Premature end of file
>
> What did I wrong?
try
0 elemente.endSeparator 'nl' -
Stopping BPM thru a msg received via mail adapter, based on mail content
Hi,
I have a scenario where a BPM is used to send document to a 3rd Party system, which ends upon receipt of a Technical message ack (TMA) carrying the Correlation ID in it.
However, there are instances wherein a duplicate document in sent to the 3rd party and in such cases a TMA is not sent back to XI. Instead an email alert is generated and sent to my inbox indicating that the document being posted by the BPM is a duplicate.
I want to modify the scenario, so that either of the TMA or the email alert can be used to stop the BPM.
For sending the mail alert sent by the 3rd party to XI, the mail sender adapter can be used. But the email alerts may be generated for multiple BPMs sending the duplicate documents to the 3rd party system.
So I need to find a way to
1. choose the mail sent to correct environment (all emails for test and production are sent to my inbox)
2. pick the correct alert email and send it to the BPM (alert email contains the Correlation ID in its xml attachment)
Please advise.
Thanks and Regards,
Dipteedoes not seem to be a raliable approach to have ACK --> Mail --> BPM scenario.....why cant the end system send the message directly to the BPM that would be much better design approach.....also what time does it take for the 3rd party to respond back with the Ack message?
Maybe you are looking for
-
Dear all, Scenario is user has created sales order for excisable finished goods ,and followed by delivery, billing and excise billing to the customer who has already received the materials (GR done). Now by mistake instead of cancelling the some oth
-
Tab not working on ALV report output in Persona
In normal SAP GUI we can move the cursor position on ALV report output between different column by pressing TAB on keyboard. But in case of persona 2.00, TAB doesn't work and we have to click on each cell of the report output whatever we want to high
-
Java broken in 8.1.5
I installed oracle 8.1.5 using the "Typical option". When I run loadjava myclass.class I get this: Error while loading com/marksaltzman/task/Task ORA-04068: existing state of packages has been discarded ORA-04067: not executed, package body "SYS.LOAD
-
DVD player not working in Pavilion DV6-6102sa
The DVD player in my laptop won't play video DVDs. It works okay with data discs, but films etc cause a problem - the drive spins up, and it sounds as though it's trying to read the disc, but not succesfully. Depending on the player depends on what h
-
How to find the corrupted files using javascript?
Hi all, I need to run batch of files some of which were corrupted?? instead of using the method "the files which were not opened are corrupted" is there any way to find the corrupted files?? I need to find this using javascript or apple script?? Plea