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 xin liu <li...@yahoo.com> on 2003/11/09 05:09:31 UTC

How to delete a message?

Hi,
I want to use James as my Email server and use Struts
to write a web app similar to Yahoo's email pages. 

My question is: when a user selects the Email he wants
to delete, how can my Java code delete that message
then? 
At first(the first request), I will retrieve the
messages and display them. After that, I will
release(should I? or put them into session?) the
references of folder(INBOX) and messages.
When second request (deleting message request) comes,
how can I uniquely identify the message and delete it?

>From the following message of jGuru:
http://www.jguru.com/faq/view.jsp?EID=479346
If it's Sun's POP3 provider, I can cast the Folder to
a com.sun.mail.pop3.POP3Folder and ask for the UID
with getUID(Message). This will return the UID as a
String, or null if not available. Is it possible for
James? Or is there any better way?

Thanks a lot!

Xin

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

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


RE: How to delete a message?

Posted by "Noel J. Bergman" <no...@devtech.com>.
> I want to use James as my Email server and use Struts
> to write a web app similar to Yahoo's email pages.

You'll be needing to learn the POP3 protocol; use Jakarta Commons Network,
and use their client; or use JavaMail's POP3 client.

> My question is: when a user selects the Email he wants
> to delete, how can my Java code delete that message
> then?

By issuing the appropriate POP3 command via one of the interfaces above.

	--- Noel


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