File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Email formating... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Email formating..." Watch "Email formating..." New topic
Author

Email formating...

pradeep gamage
Ranch Hand

Joined: Aug 03, 2009
Posts: 85

I am developing web application using java , spring and jsf 2.
So when user register with system, system automatically send a email.
This is email sending template

.


I want insert images and create look nice email template. Please give me idea to create email template.
Thanks in Advance...


Software Engineer(BSC):SCJP 1.5
(Knowledge is power when applied)
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19649
    
  18

Use the Apache Commons Email library, in particular the HtmlEmail class, to create an HTML email message. You can use any formatting you want inside the HTML content. Images can be added inline through the example on the class' Javadoc page.

I'd also use the setTextMsg method to set a plain text part for those clients that do not support HTML emails. This should be a simplified version of your HTML part without all the fancy formatting and images.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
pradeep gamage
Ranch Hand

Joined: Aug 03, 2009
Posts: 85

Thank You Its Work for me...
 
jQuery in Action, 2nd edition
 
subject: Email formating...
 
Similar Threads
Can we attach multiple email addresses through spring email
Issue in Sending Email from Spring Mail
Guestion is Validate the text?
Mail API Problem
Java Mail Authentication