This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Email formating...  RSS feed

 
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
Posts: 21047
85
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
Boost this thread!