cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

you missed the "payload swap bean".Its used to swap the payload and transfer it to Transform bean.

Regards,

Prakasu

Former Member
0 Kudos

Hello Prakasu,

thanks for your answer. What module parameters do I need to set for the PayloadSwapBean?

Kind regards

Stefan

Former Member
0 Kudos

hi,

check the bellow link.

[https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2849] [original link is broken] [original link is broken] [original link is broken];

Regards,

Prakasu

Former Member
0 Kudos

Hello Prakusu,

thank you for providing the link to the blog. I could adapt it partly. The blog describes the necessary configuration for receiving mails by the IE (sender adapter configuration), I'm doing the configuration for a receiver adapter. The payload swap works fine, the mail is sent together with the attachment, I still have an issue with the correct naming of the attachment. When doing the configuration as described in the blog, the filename of the attachment is 'Untitled.xml'. Any idea ?

Thank you and best regards

Stefan

Former Member
0 Kudos

hi,

check the bellow link..Its helpful to resolve your issue.

[;

Regards,

Prakasu

Former Member
0 Kudos

Hi Stefan

Were you able to get the correct naming of the attachment. I am facing similar issue when sending attachments through mail

Regards,

Soorya

Former Member
0 Kudos

Hello Soorya,

unfortunately, I still did not find a solution to my problem. Habe you been successful?

Best regards

Stefan

Former Member
0 Kudos

Hi,

The below link will help to resolve your issue...

[https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/6321] [original link is broken] [original link is broken] [original link is broken];

[https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1815] [original link is broken] [original link is broken] [original link is broken];

Regards,

Prakasu

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi ,

Refer this Blog It Explain step by step procedure for sending a mail in a report format

Regards,

Suryanarayana