Java Mail-inserting an image

Is it possible to insert a picture in an email? If so, how do I do it? Thanks.

Author: Jenkamen, 2011-03-24

2 answers

We will assume that we have dealt with sending emails as such via Java Mail.

Put the image in the attachment and put the attachment title (setContentID)

Content-ID: <my.image.id>

Make the body of the text text / html and link to the image as follows:

<img alt="test" src="cid:my.image.id" />

So after all, the link that you gave is exactly what is described below.. so I don't understand why you decided not to

 3
Author: cy6erGn0m, 2011-03-24 15:35:53

You can, of course. Here's how is described here, for example. In fact, you either compose a message in HTML and insert <img> or add an attachment to the message.

 0
Author: yozh, 2011-03-24 13:01:02