Skip to Content
0
Former Member
Jul 08, 2008 at 08:40 PM

How to switch between body and attachment of an email message ??

23 Views

Dear colleagues,

I' using the email receiver adapter (transport protocol: SMTP, message protocol: XIPAYLOAD) and dynamic configuration attributes (THeaderFROM, THeaderTO) in order to dynamically set the sender and receiver adress of the email (I'm not yet using the mail package).

I'm furthermore using the following module configuration in order to map the values of all subelements of a tag called <Zeile> into one line of the email body and to swap the email body into an email attachment:

Modul name Modul Type Modul Key

AF_Modules/StrictXml2PlainBean Local Enterprise Bean XML

AF_Modules/MessageTransformBean Local Enterprise Bean MTB

sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean Local Enterprise Bean mail

Modul Key Parameter Name Parameter Value

XML Zeile.endSeparator \r\n

XML Zeile.fieldLengthExceeded error

XML Zeile.fieldLengths 1,7,13,20,1,86

XML contentType text/plain;charset=utf-8

XML singleRecordType Zeile

MTB Transform.ContentDescription filename

MTB Transform.ContentDisposition attachment:filename="DTTECA.txt"

MTB Transform.ContentType text/plain; "DTTECA.txt"

The result is an email which is sent to the configured receiver, but the text lines appear in the mail body and not in the attachment of the mail. Do I need to use another modul or idid I just badly configure the module I have used (MessageTransformBean)?

I also would like to assign a predefined name to the mail attachment and add some text the mail body.

Any kind of help would be greatly appreciated.

Best regards

Stefan

Edited by: Stefan Franke on Jul 8, 2008 10:40 PM