• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to send HTML page in mail insted of text

 
shippu devaraju
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,
Can any body tell me how i can send a html page in a mail.Here insted of Plain text i want send an Html page.
Thanks In advance
bye
shippu
 
Jason Brawner
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you sending the email? The JavaMail API?
 
shippu devaraju
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes I am sending via java Mail API
 
Jason Brawner
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is an example of a servlet sending an HTML email. It doesn't send a distinct page but it can be used to generate HTML to send. Offhand, the only way I can think to send an HTML page is to read in the page thru IO to a String and use message.setContent(yourString). There might be a better way.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic