cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove a Attachment in Module for Mail Adapter

Former Member
0 Kudos

Hi together,

we are trying to remove a Mail Attachment within a outgoing Mail with the help of a new Module executed by the Mailadapter. Since we are using the XI 3.0, we are trying to do that by this statements:

...

Message msg = (Message)inputModuleData.getPrincipalData();

Iterator it = msg.getAttachmentIterator();

Payload payload;

do

{

payload = (Payload)it.next();

if(payload.getName().equalsIgnoreCase("MailMessage"))

{

it.remove();

}

}while(it.hasNext()); ...

The statement "it.remove" doesn't work.

Does anyone have an idea, how we can remove the attachment?

Thanks & Regards

Thomas

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

I am sorry, the adapter module API does not support the removal of an attachment.

Regards

Stefan

Answers (0)