cancel
Showing results for 
Search instead for 
Did you mean: 

IDoc to Mail (with attachment) scenario

elko_hasse
Participant
0 Kudos

Hello,

I have a simple IDoc to Mail scenario. The payload is send as mail attachment.

The IDoc is mapped to a structure representing the attachment-file format.

The <b>mail adapter</b> is set up as follows:

Transport-Protocol: SMPT

Message-Protocol: XIALL

<i>Use Adapter-Specific Message Attributes</i> and <i>Variable Transport Binding</i> are checked.

I also use Modul <i>StrictXml2PlainBean</i> to convert the Payload into FlatFile-Format.

And I use the Modul <i>MessageTransformBean</i> to set up the Payload as attachment and to set up the name of the attachment. I use these parameters:

Transform.ContentDisposition = attachment;filename=test.txt
Transform.ContentType        = text/plain

The result is an Email with two files as attachment.

The first file contains the payload in FlatFile-Format as expected, but there is also a second file (XML-Format) with information about the message.

Now:

1. How can I get rid of the XML-File? I dont need it and it doesn't help the receiver of the Email, its just confusing.

2. How can I set up a dynamic name for the attachment from the paylaod ?

Thanks for your help.

Elko

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

HI,

Go through the below weblog:

/people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure

You can acheive it using the message protocole tab in adapter.

Thnx

Chirag

elko_hasse
Participant
0 Kudos

Thanks for your answer, but it wont help in my case, I still dont know how to set the attachment name dynamically from the payload.

Elko

Former Member
0 Kudos

HI,

You mean to say you wanted the file mane should be created with the value which is coming from the apyload.

Thanks and Regards,

Chirag

elko_hasse
Participant
0 Kudos

Yes,

in the Payload I have a structure representing the content of the attachment, and I have a field with the attachment-name.

I want to use this field in the payload to be used for the attachment created in mail adapter.

Elko

Former Member
0 Kudos

HI,

I think your problem is solved.

Refer the weblog which does the same thing.

/people/michal.krawczyk2/blog/2006/02/23/xi-dynamic-name-in-the-mail-attachment--pseudo-variable-substitution

I hope this is what you want.

Thnx

Chirag Gohil