Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is it possible to format mimeMessage text?

 
Stefan Elfvinge
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I'm using javax.mail in a webappliction. The message and subject vary as to who the recipient is, certain properties etc. To alert the reciever I would like to be able to use a BIG font sometimes in the message. Can someone tell if this is possible? Should I use java.awt.Font to somehow format the message?
Thanks in advance!
 
Ankur Goyal
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Create a mime message of 'text/html' content-type and use HTML tags to format ur content. It's like embedding an HTML page in ur email.
 
Stefan Elfvinge
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Working excellent, thanks!!!
 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

The message and subject vary as to who the recipient is, certain properties etc

I just made an app component like this. I used java.text.MessageFormat. Works very well. Mimimal parameter passing. Mimimal String creation/concatenation/manipulation.
java.text.MessageFormat
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic