Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JavaMail- To display image as background of a mail using java mail api**URG

829127Jan 6 2011 — edited Jan 7 2011
Hi All,

Someone please let me know if it is possible to make an image display as a background of an email using java mail.
I had tried using below code.

//code

message.setContent( "<html><body><table width=\"100%\" height=\"90%\" border=\"0\" cellspacing=\"0\" cellpadding=\"20\" background=\"https://ttslemc.tatatel.co.in/EMC_FEEDBACK/imagepool/indicom_logo.jpg\"><tr><td><p>"+ content+ "</p></td></tr></table></body></html>",
"text/html");

//here content is a variable containing mail content captured from a html text area
//code

This is displaying me the image but the content formatting is lost.Everything appears in single line.
Is it possible to have a background image and the content formatted properly for a html mail using java mail api.
Please help.....ASAP
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 4 2011
Added on Jan 6 2011
8 comments
1,081 views