There are 2 approaches...

You can write a Mailet that will do a System.out.println in the JAMES
console whenever an email with your user account name comes in.

Or you can wirite a JavaMail application that will connect via POP, look at
your default folder, and count how many emails you have and notify you.

A good article on how to write a simple Javamail client can be found at:
http://www.javaworld.com/javaworld/jw-06-1999/jw-06-javamail.html


________________________
Ramon Gonzalez
Tampa Bay, Florida


----- Original Message -----
From: "Noel J. Bergman" <[EMAIL PROTECTED]>
To: "James-User Mailing List" <[EMAIL PROTECTED]>
Cc: "Robert Douglass" <[EMAIL PROTECTED]>
Sent: Wednesday, July 10, 2002 11:08 AM
Subject: RE: James <-> JavaMail notification


> Robert,
>
> You could write a notification mailet.  The nature of the notification
> mechanism is up to you.
>
> --- Noel
>
> -----Original Message-----
> From: Robert Douglass [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 10, 2002 9:03
> To: Noel J. Bergman
> Subject: AW: translation (JP)
>
>
> No, I hadn't looked at the code. The 20-30 minutes that I've had so far to
> research the matter didn't permit any in-depth analysis... therefore I
asked
> the list. Thank you for answering. How does one best achieve this type of
> notification using JAMES? I haven't looked at the Mailet API yet, is that
> where I should start? Is there any way to have JAMES communicate with my
> JavaMail application when a new message arrives?
>
> -Robert Douglass
>
> -----Ursprungliche Nachricht-----
> Von: Noel J. Bergman [mailto:[EMAIL PROTECTED]]
> Gesendet: Mittwoch, 10. Juli 2002 14:57
> An: [EMAIL PROTECTED]
> Betreff: RE: translation (JP)
>
>
> Haven't you looked at the code?  James doesn't currently use JavaMail to
> store messages.  How are you expecting the folder listener to work?
>
> --- Noel
>
> -----Original Message-----
> From: Robert Douglass [mailto:[EMAIL PROTECTED]]
> Sent: Friday, July 05, 2002 4:53
> To: James Users List
> Subject: AW: translation (JP)
>
>
> Hi James Users,
> I'm trying to write a JavaMail application that notifies me when there is
> new mail in my James inbox. My approach has been to register a
> MailCountListener to the folder in a thread that keeps the folder
connection
> open:
>
> folder.addMessageCountListener(new javax.mail.event.MessageCountListener()
{
> public void messagesAdded(javax.mail.event.MessageCountEvent e) {
> System.out.println("You've got mail!");
> }
>
> public void messagesRemoved(javax.mail.event.MessageCountEvent e) {
> //do nothing
> }
> });
>
> But, alas, it's not working. I know this isn't a JavaMail list, but I was
> wondering if anybody has any advice, code examples, related experience to
> help guide me.
>
> Thanks,
>
> Robert Douglass
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.368 / Virus Database: 204 - Release Date: 5/29/2002


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to