cancel
Showing results for 
Search instead for 
Did you mean: 

Send Mail With Proper Content For Error's

Former Member
0 Kudos

Hi Experts,

I am working on one requirment as follows.

I am sending a sales order information as xml file using file adapter with NFS protocol. I need to send mail in both cases ( Successfull or Error ) to perticular distribution list. The content of message should contain some information from Payload of data.

For Error situation we have alert mechanism but not very usefull as we are not able to provide all details in mail as not able to read content of message when it comes to Alert Category.

Can any one help me please? Let me know in case of some more information is required.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hI ,

Use this xml file nd convert into xsd format nd again import if ur looking for mail file. may be it can help u

<?xml version="1.0" encoding="ISO-8859-1"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xi="http://sap.com/xi/XI/Mail/30" targetNamespace="http://sap.com/xi/XI/Mail/30">

<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:annotation>

<xs:documentation>

optional subject line

</xs:documentation>

</xs:annotation>

</xs:element>

<xs:element name="From" type="xs:string" minOccurs="0">

<xs:annotation>

<xs:documentation>

optional sender email address (required for SMTP)

</xs:documentation>

</xs:annotation>

</xs:element>

<xs:element name="To" type="xs:string" minOccurs="0">

<xs:annotation>

<xs:documentation>

optional one or more receiver email addresses (required for SMTP)

</xs:documentation>

</xs:annotation>

</xs:element>

<xs:element name="Reply_To" type="xs:string" minOccurs="0">

<xs:annotation>

<xs:documentation>

optional reply-to email addresses

</xs:documentation>

</xs:annotation>

</xs:element>

<xs:element name="Content_Type" type="xs:string" minOccurs="0">

<xs:annotation>

<xs:documentation>

optional content type (default is text/plain)

</xs:documentation>

</xs:annotation>

</xs:element>

<xs:element name="Content_Description" type="xs:string" minOccurs="0">

<xs:annotation>

<xs:documentation>

optional content description

</xs:documentation>

</xs:annotation>

</xs:element>

<xs:element name="Content_Disposition" type="xs:string" minOccurs="0">

<xs:annotation>

<xs:documentation>

optional content disposition

</xs:documentation>

</xs:annotation>

</xs:element>

<xs:element name="Date" type="xs:dateTime" minOccurs="0">

<xs:annotation>

<xs:documentation>

optional date

</xs:documentation>

</xs:annotation>

</xs:element>

<xs:element name="Message_ID" type="xs:string" minOccurs="0">

<xs:annotation>

<xs:documentation>

optional message id

</xs:documentation>

</xs:annotation>

</xs:element>

<xs:element name="X_Mailer" type="xs:string" minOccurs="0">

<xs:annotation>

<xs:documentation>

optional mail program name

</xs:documentation>

</xs:annotation>

</xs:element>

<xs:element name="Content" minOccurs="0">

<xs:annotation>

<xs:documentation>

any mixed content type

</xs:documentation>

</xs:annotation>

</xs:element>

</xs:sequence>

<xs:attribute name="encoding" type="xs:string">

<xs:annotation>

<xs:documentation>

optional encoding name (base64, quoted-printable)

</xs:documentation>

</xs:annotation>

</xs:attribute>

</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:annotation>

<xs:documentation>

Server URL

</xs:documentation>

</xs:annotation>

</xs:element>

<xs:element name="Greeting" type="xs:string">

<xs:annotation>

<xs:documentation>

Server Greeting Message

</xs:documentation>

</xs:annotation>

</xs:element>

<xs:element name="Format" type="xs:string">

<xs:annotation>

<xs:documentation>

Message Format XIALL or XIPAYLOAD

</xs:documentation>

</xs:annotation>

</xs:element>

<xs:element name="UseMailPackage" type="xs:boolean">

<xs:annotation>

<xs:documentation>

Mail Package Flag

</xs:documentation>

</xs:annotation>

</xs:element>

<xs:element name="Encoding" type="xs:string">

<xs:annotation>

<xs:documentation>

Encoding name

</xs:documentation>

</xs:annotation>

</xs:element>

<xs:element name="Subject" type="xs:string" minOccurs="0">

<xs:annotation>

<xs:documentation>

Mail Subject

</xs:documentation>

</xs:annotation>

</xs:element>

<xs:element name="From" type="xs:dateTime" minOccurs="0">

<xs:annotation>

<xs:documentation>

Mail From

</xs:documentation>

</xs:annotation>

</xs:element>

<xs:element name="To" type="xs:string" minOccurs="0">

<xs:annotation>

<xs:documentation>

Mail To

</xs:documentation>

</xs:annotation>

</xs:element>

<xs:element name="Date" type="xs:dateTime" minOccurs="0">

<xs:annotation>

<xs:documentation>

Mail date

</xs:documentation>

</xs:annotation>

</xs:element>

<xs:element name="MailID" type="xs:string" minOccurs="0">

<xs:annotation>

<xs:documentation>

Mail ID

</xs:documentation>

</xs:annotation>

</xs:element>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name="FetchReport">

<xs:annotation>

<xs:documentation>

Fetch Report for XI - Mail Adaper

</xs:documentation>

</xs:annotation>

<xs:complexType>

<xs:sequence>

<xs:element name="Server" type="xs:string">

<xs:annotation>

<xs:documentation>

Server URL

</xs:documentation>

</xs:annotation>

</xs:element>

<xs:element name="Greeting" type="xs:string">

<xs:annotation>

<xs:documentation>

Server Greeting Message

</xs:documentation>

</xs:annotation>

</xs:element>

<xs:element name="User" type="xs:string">

<xs:annotation>

<xs:documentation>

User Name

</xs:documentation>

</xs:annotation>

</xs:element>

<xs:element name="Date" type="xs:dateTime" minOccurs="0">

<xs:annotation>

<xs:documentation>

Mail Date

</xs:documentation>

</xs:annotation>

</xs:element>

<xs:element name="Messages" type="xi:FetchedMessages">

<xs:annotation>

<xs:documentation>

Mail Messages

</xs:documentation>

</xs:annotation>

</xs:element>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:complexType name="FetchedMessages">

<xs:sequence>

<xs:element name="item" type="xi:FetchedMessage" minOccurs="0" maxOccurs="unbounded" />

</xs:sequence>

<xs:attribute name="new" type="xs:int">

<xs:annotation>

<xs:documentation>

the number of new messages found

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="total" type="xs:int">

<xs:annotation>

<xs:documentation>

the number of total messages found

</xs:documentation>

</xs:annotation>

</xs:attribute>

</xs:complexType>

<xs:complexType name="FetchedMessage">

<xs:sequence>

<xs:element name="Subject" type="xs:string">

<xs:annotation>

<xs:documentation>

Mail Subject

</xs:documentation>

</xs:annotation>

</xs:element>

<xs:element name="From" type="xs:string">

<xs:annotation>

<xs:documentation>

Mail From

</xs:documentation>

</xs:annotation>

</xs:element>

<xs:element name="To" type="xs:string">

<xs:annotation>

<xs:documentation>

Mail To

</xs:documentation>

</xs:annotation>

</xs:element>

<xs:element name="Message_ID" type="xs:string">

<xs:annotation>

<xs:documentation>

Mail ID

</xs:documentation>

</xs:annotation>

</xs:element>

</xs:sequence>

<xs:attribute name="status" type="xs:string">

<xs:annotation>

<xs:documentation>

the status of XI processing

</xs:documentation>

</xs:annotation>

</xs:attribute>

<xs:attribute name="id" type="xs:string">

<xs:annotation>

<xs:documentation>

the XI message ID associated with the mail message

</xs:documentation>

</xs:annotation>

</xs:attribute>

</xs:complexType>

</xs:schema>

Former Member
0 Kudos

Dear Raju,

I think you did not understand my question. I need to send the mail when error occurs but with detailed mail containing error cause of error some information from payload and attched XML. I checked the alert mechanism but it doesn't look feasible.

rajasekhar_reddy14
Active Contributor
0 Kudos

My suggestion is add one mail receiver to send and email with payload as an attachment and use existing alert mechanism .

but only issue with here is you will receive two emails for failure case.

Regards,

Raj

Former Member
0 Kudos

Dear Raja,

Thanks for reply.

My requirment is to send mail in error case with proper error message along with Payload. If we use another mail reciever, the two flow will be independant. Even if first flow has issue second flow will send mail and also how we can pass the error in flow to second flow.