File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes How to send HTML page in mail insted of text Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to send HTML page in mail insted of text" Watch "How to send HTML page in mail insted of text" New topic
Author

How to send HTML page in mail insted of text

shippu devaraju
Greenhorn

Joined: Feb 26, 2002
Posts: 11
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

Joined: Dec 19, 2001
Posts: 66
How are you sending the email? The JavaMail API?


Jason E. Brawner<br />Sun Certified Java Programmer<br />Sun Certified Web Component Developer
shippu devaraju
Greenhorn

Joined: Feb 26, 2002
Posts: 11
Yes I am sending via java Mail API
Jason Brawner
Ranch Hand

Joined: Dec 19, 2001
Posts: 66
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.
 
Consider Paul's rocket mass heater.
 
subject: How to send HTML page in mail insted of text
 
Similar Threads
display image and text both on jsp page
html reusability
servlet responce to textfile
how to get text under current corsor position
Reading web page from servlet