aspose file tools
The moose likes Other JSE/JEE APIs and the fly likes Generate Email body Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Reply Bookmark "Generate Email body" Watch "Generate Email body" New topic
Author

Generate Email body

Sahana Hegde
Ranch Hand

Joined: Jan 27, 2008
Posts: 67
Hello,

How can I generate the email body to be sent with some styles.

For now I am just creating a string and appending information to the string.I am appending a \r where I need a gap.

The email is generated something like this.

----------------------
Name : sah

Forum : javaranch

url : www.url.com

----------------------

How can I make it look better?

Thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35243
    
    7
What does this have to do with HTML/JavaScript (which this forum is all about)?


Android appsImageJ pluginsJava web charts
Sahana Hegde
Ranch Hand

Joined: Jan 27, 2008
Posts: 67
Well, I was not sure where to put it. Please let me know where I should post the same.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19216

You could use HTML formatted email.


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
Sahana Hegde
Ranch Hand

Joined: Jan 27, 2008
Posts: 67
Thanks for the reply.
How do I create HTML formatted emails. Can you please suggest any link.
The first few links I found on google were not very helpful.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19216

Use MimeMessage's setContent(Object, String) method. The first parameter will be a String with the HTML content, and the second will be "text/html".
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Generate Email body
 
Similar Threads
getting images from web
Generate Id.
HttpClient redirect
Journal Article - Velocity - An Introduction
Form Value