cancel
Showing results for 
Search instead for 
Did you mean: 

error in mail adapter whilst using 'mail package' option

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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 ?

former_member181962
Active Contributor
0 Kudos

Cross check your settings with this demo scenario:

http://www.sap technical.com/Tutorials/XI/IDoctoMail/demo.htm (Remove space between sap and technical)

Regards,

Ravi

Former Member
0 Kudos

Hi,

I compared my channel configuration, everything looks fine. I suspect somrthing is missing from 'adapter module' setting. Can you please suggest if I need to add any more module. Currently, these are used:

AF_Modules/StrictXml2PlainBean

AF_Modules/MessageTransformBean

sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean

former_member200962
Active Contributor
0 Kudos
No data is allowed on this structure level (2) at XML element Mail,Subject

May be your StrictXml2Plain module is causing the above error.

prateek
Active Contributor
0 Kudos

When you use mail package, your actual payload will be attachment and to access it, you have to use PayloadSwapBean. If your payload is text file, then use this mentioned module before StrictXml2PlainBean.

Regards,

Prateek

Former Member
0 Kudos

Thanks Guys. I got it working. I found a similar case in one of our another interface.

Problem is solved by using only 1 module adapter:

sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean

and no parameters in module configuration.

Thanks for your time.

regards, Dehra

prateek
Active Contributor
0 Kudos

What all adapter modules are you using in this channel? For what purpose?

Regards,

Prateek

Former Member
0 Kudos

these are the adapter modules configured currently:

AF_Modules/StrictXml2PlainBean

AF_Modules/MessageTransformBean

sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean