• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

Setting Priorities for Mail

 
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 43016
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
World domination requires a hollowed out volcano with good submarine access. Tiny ads are optional.
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic