sangramjadhav / simple-java-mail

Clone of Simple-java-mail
http://code.google.com/p/simple-java-mail
0 stars 0 forks source link

Access to headers and flags... #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
One other thing which I spotted which aren't catered for by SimpleJavaMail but 
are by the Javamail API.

Headers
-------
Personally, I hate them, but clients are always asking if you can set the 
"important" flag on emails.  This is normally done by setting custom headers 
such as X-Priority and Importance.  To do this, javamail provides 
message.setHeader(String,String).  Would be good to be able to do this in 
simplejavamail

I'm now using simplejavamail "in anger" (although still in a testing phase) so 
I may well suggest some other enhancements as I find them.

As I said last time, great work...much easier than the javamail api.

Tom

Original issue reported on code.google.com by email.to...@gmail.com on 18 Aug 2011 at 4:31

GoogleCodeExporter commented 9 years ago
The trouble is, those headers aren't part of the email specification: those 
headers differ per client. There are several headers just for priority:

Priority (Urgent);
Importance (low, normal, high)
X-Priority (1, 2, 3, 4, 5)
X-MSMail-Priority

Apache commons mail simply supports adding open headers, while Spring supports 
X-Priority specifically.

I think I'll add both.

Original comment by b.bottema on 20 Aug 2011 at 8:56

GoogleCodeExporter commented 9 years ago
I've added support to add any header you want. Released in v2.0.

Original comment by b.bottema on 20 Aug 2011 at 10:53