wood burning stoves*
The moose likes Other JSE/JEE APIs and the fly likes Setting Priorities for Mail Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Setting Priorities for Mail " Watch "Setting Priorities for Mail " New topic
Author

Setting Priorities for Mail

Shrinivas Mujumdar
Ranch Hand

Joined: Aug 27, 2004
Posts: 328
Hello Friends,
I am working on one application where I need to use JavaMail API for sending mail. I want to send an e-mail on specific events. Actual requirement is for certain events I need to set the priority of mails to 'high' and for other events it should be 'Low' or 'Medeium'
When I was going through JavaMail API documentation (javax.mail and javax.mail.internet)I could not see any facility to do so. I might have missed something out there.

So, question is How to set priorities for mails while sending using JavaMail API.

Any help in this regard will be really thankful.

Thanks in Advance,
Shriniwas
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41180
    
  45
You need to set a message header explicitly, since there's no API call for it:



1 = high, 3 = normal, 5 = low


Ping & DNS - my free Android networking tools app
Shrinivas Mujumdar
Ranch Hand

Joined: Aug 27, 2004
Posts: 328
Thanks Ulf.

Just want to know whether these header values are specific to MS-Outlook or they remain the same across all the mail applications.

Thanks,
Shriniwas
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41180
    
  45
It's pretty standardized (and understood by mail clients) the way I described it. You can test whether your client does something different by sending yourself messages of all 3 levels, and then looking at the raw headers.
[ April 18, 2008: Message edited by: Ulf Dittmer ]
Shrinivas Mujumdar
Ranch Hand

Joined: Aug 27, 2004
Posts: 328
Yes It's working.I have tested this in my application & I could see mails with different priorities.

Thanks a Lot..

Thanks,
Shriniwas
[ April 22, 2008: Message edited by: Shrinivas Mujumdar ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setting Priorities for Mail
 
Similar Threads
send email using Domino servers
Javax.mail.MessagingException
Opening encrypted mails
Create e-mail via servlet
is it possible to send mail within LAN?