Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Email formating...

 
pradeep gamage
Ranch Hand
Posts: 85
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Rob Spoor
Sheriff
Pie
Posts: 20608
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
pradeep gamage
Ranch Hand
Posts: 85
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You Its Work for me...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic