JavaMail- To display image as background of a mail using java mail api**URG
829127Jan 6 2011 — edited Jan 7 2011Hi 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