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