commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fausto Lelli" <>
Subject Fw: problem commons-email html embedded img
Date Fri, 24 Nov 2006 10:15:48 GMT

I'm using Commons-Email and trying to send an HTML email with an embedded image.

The email got sent but I can see the embedded image within the email using 

Thunderbird or Evolution as an email client, instead I can only see the image as an 

attached  file.  Outlook Express is showing the picture fine tough.

I'm doing the test with the sample code in  the commons-email docs.

// Create the email message
HtmlEmail email = new HtmlEmail();
email.addTo("", "Me");
email.setFrom("", "Me");
email.setSubject("Test email with inline image");

// embed the image and get the content id
URL url = new URL("file:///C:/03.jpg");
String cid = email.embed(url, "Apache logo");

// set the html message
email.setHtmlMsg("<html>The apache logo - <img src=\"cid:"+cid+"\"></html>");

// set the alternative message
email.setTextMsg("Your email client does not support HTML messages");

// send the email
My Environment:

Commons Email 1.0
Thunderbird (20061025)
Outlook Express 6.00.29

java 5.0_08

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message