cancel
Showing results for 
Search instead for 
Did you mean: 

Renaming attachment file name in receiver mail adapter

Former Member
0 Kudos

Experts,

I have a file to mail scenario where an xml file is picked up and transformed into the target format in XI which has to be sent as an attachement in an email on the receiver side.

I am getting the mail with the attachement. But I would like to rename the attachment as the name of the picked up file.

I am using Adapter specific message attributes on both sides but the attachment is named as untitled.xml.

Please advise. Can this be achieved by using the swap bean or the message transform bean?

Regards,

Shobhit

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Shobhit,

The module tab of your mail adapter will look like this.

Processing Sequence

Module Name Type Module Key

localejbs/AF_Modules/MessageTransformBean rename LocalEnterpriseBean

sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean mail Local EnterpriseBean

Module Configuration

Module Key Parameter Name Parameter Value

rename Transform.ContentDescription File

rename Transform.ContentDescription attachement;filename="yourfilename.ext"

rename Transform.ContentType application/text;name="yourfilename.ext"

Thanks

Amitanshu

Former Member
0 Kudos

Hi Michal,

Your blog is really useful although im yet to implement it.

Thanks,

Shobhit

Former Member
0 Kudos

Hi-

Check out this blog

/people/community.user/blog/2006/09/08/email-report-as-attachment-excelword

also check out the link for content types that you can try

http://www.utoronto.ca/ian/books/html4ed/appb/mimetype.html.

Also Check out ths blog by Michal apart from what he mentioned above

/people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter

Former Member
0 Kudos

Hi Michal,

Im using the Conversion Agent Serializer module to convert the xml payload to a text payload. Can I still use your custom module to rename the target file? (Maybe before calling the Conversion Agent module.)

I need to use the same filename as the source filename.

Example Source file: cfx4636sdfr.xml (XML)

Example Target file: cfx4636sdfr.bai (text)

Regards,

Shobhit

MichalKrawczyk
Active Contributor
0 Kudos

hi,

yes you can use my adapter module

Regards,

michal

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

have a look at my blog:

XI: Dynamic name in the mail attachment

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

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>