You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Gaurav Handa <ga...@amsoft.net> on 2005/09/24 15:51:27 UTC

Can attachment be removed after intercepting on mail server?

Hi all,

 

On the apache James mail server I am having, I need to remove a particular
attachment from the mail after I receive it on the server. I was successful
to intercept the attachment and read data from it. But the other part of
problem is that I have to write data in the same file or simply remove the
file from mail. 

I think the option of removing the file after finding one should be easier.
Is there some way by which I can remove the attachment from e-mail received
on server?

 

 

Thanks,

Gaurav Handa


Re: Can attachment be removed after intercepting on mail server?

Posted by Danny Angus <Da...@slc.co.uk>.
> on the apache James mail server I am having, I need to remove a
particular
> attachment from the mail after I receive it on the server.

> I was successful
> to intercept the attachment and read data from it. But the other part of
> problem is that I have to write data in the same file or simply remove
the
> file from mail.

Gaurav,

I really think you need to study JavaMail to answer these questions.

Try creating a new MimeMultipart and copying only those parts you want to
retain to the new multipart from the old one.
Then set the new one as the content of the message and save changes.

Or just modify the attachement and save changes.


d.


***************************************************************************
The information in this e-mail is confidential and for use by the addressee(s) only. If you are not the intended recipient (or responsible for delivery of the message to the intended recipient) please notify us immediately on 0141 306 2050 and delete the message from your computer. You may not copy or forward it or use or disclose its contents to any other person. As Internet communications are capable of data corruption Student Loans Company Limited does not accept any  responsibility for changes made to this message after it was sent. For this reason it may be inappropriate to rely on advice or opinions contained in an e-mail without obtaining written confirmation of it. Neither Student Loans Company Limited or the sender accepts any liability or responsibility for viruses as it is your responsibility to scan attachments (if any). Opinions and views expressed in this e-mail are those of the sender and may not reflect the opinions and views of The Student Loans Company Limit
 ed.

This footnote also confirms that this email message has been swept for the presence of computer viruses.

**************************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org