Type: New Feature
Affects Version/s: None
Fix Version/s: 1.3
I have created a improvement on top of HtmlEmail class which automatically detects <img src=".."/> tags in the HTML source and which embeds all the URLs correctly in the email so they are sent as attachments as part of the email.
It is implemented as new class ImageHtmlEmail, no existing code of commons email is touched at all.
This make sending HTML Mails much easier, now it is as simple as
ImageHtmlEmail email = new ImageHtmlEmail();
String html = FileUtils.readFileToString(new File("/tmp/test_email.html"));
// set the html message
email.setHtmlMsg(html, new File("/tmp"));
// set the alternative message
email.setTextMsg("Your email client does not support HTML messages");
// send the email
as stated in the mail, I am making this availalbe under the Apache License 2.0 so that it can be integrated if it sounds useful.