File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting Priorities for Mail

 
Shrinivas Mujumdar
Ranch Hand
Posts: 328
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to set a message header explicitly, since there's no API call for it:



1 = high, 3 = normal, 5 = low
 
Shrinivas Mujumdar
Ranch Hand
Posts: 328
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 328
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic