cancel
Showing results for 
Search instead for 
Did you mean: 

Payload as Attachment in mail

Former Member
0 Kudos

Dear All

I have an XML file which I need to convert to a flat file and send as a mail attachment.

The problem is that I dont want the payload of the file to be a part of the message text.

Please suggest a solution

Sourabh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

In this case you can proceed like this

1. create a mail adapter

2. then at module level configure the message transform bean and do configure the content conversion paramters

fro converting to flatfile ....

HTH

Rajesh

Former Member
0 Kudos

Hi Rejesh

Will this coverted file go to the message text of the mail?

How can I prevent this and put this file as an attachment only.

Thanks

Sourabh

former_member200962
Active Contributor
0 Kudos

By Selecting the message protocol as XIALL your message will always be sent as an attachment.

Using XIPAYLOAD you can check the Keep attachment option.

Regards,

Abhishek.

Former Member
0 Kudos

Hi Sourabh,

XSLT Mapping will be helpful in your scenario

The following blog will be helpful, instead of word/excel you need to use .txt in the mapping.

[eMail Report as Attachment|http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3417100%29ID0352420250DB01126908113326823341End?blog=/pub/wlg/4375]

Select message protocol as XIPAYLOAD in the receiver mail adapter

Regards,

Gautam Purohit

Answers (1)

Answers (1)

Former Member
0 Kudos

use receiver mail adapter and select message protocol as XIPAYLOAD.

select Use mail package option and keep attachment

http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417100)ID0986209050DB01214330626217561050End...

refer this for how to use Use mail package option http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417500)ID0528701850DB00303731739768576528End...

as explained in this blog You need Mail.xsd as receiver message type .there is a field Content_Type inside this structure pass

Text/plain to this field.the attachment created will be Untitled.txt.

If you want to give a name to the attachment you have to Use MessageTransformationBean