Thanks for the replies.
It is possible to send Html mails through java mail api, and i have seen few tutorials on embedding images too. What i'm trying to do is write a html message and in <link> tag to embed style sheet. If the email client is capable of displaying Html content, it should be able to render the <link> tag as well, isnt it?? (since it is a html component). And within the style sheet i have reference to images too.
Normally to embed images, we create a bodypart, construct a datasource and set datahandler to the bodypart with the datasource and add the bodypart to the message setting up a content id which can be used to reference the image through
![]()
tag. But it doesn't work as i thought, instead of embedding the .css file , it sends it as attachment. So i want to know whether are there any possible ways to do this?? I have seen templated mails sent as notifications from few sites like American express Credit card statements, but cannot get the source of those stuff. Also the tutorials says that in this way we can embed images, but still i get them as attachments too.
Are there any other ways to send templated mails using java mail api with embedded images???
Thanks.