Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 45093 invoked from network); 7 Jul 2010 20:41:15 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Jul 2010 20:41:15 -0000 Received: (qmail 13098 invoked by uid 500); 7 Jul 2010 20:41:15 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 13021 invoked by uid 500); 7 Jul 2010 20:41:14 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 13013 invoked by uid 99); 7 Jul 2010 20:41:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jul 2010 20:41:14 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jul 2010 20:41:11 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o67KeobM004737 for ; Wed, 7 Jul 2010 20:40:50 GMT Message-ID: <20721035.245491278535250270.JavaMail.jira@thor> Date: Wed, 7 Jul 2010 16:40:50 -0400 (EDT) From: "Siegfried Goeschl (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (EMAIL-92) Improve support to embed images in HTML eMails In-Reply-To: <934601133.131771262992494413.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/EMAIL-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12886071#action_12886071 ] Siegfried Goeschl commented on EMAIL-92: ---------------------------------------- I nearly finished my work on your code - I leave a quick note when I commit my changes. Have a look at it if everything is fine and hopefully I did not break your usecases > Improve support to embed images in HTML eMails > ---------------------------------------------- > > Key: EMAIL-92 > URL: https://issues.apache.org/jira/browse/EMAIL-92 > Project: Commons Email > Issue Type: New Feature > Reporter: Dominik Stadler > Assignee: Siegfried Goeschl > Attachments: EMAIL-92-with-test.patch, ImageHtmlEmail.java, ImageHtmlEmail.java > > > I have created a improvement on top of HtmlEmail class which automatically detects 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(); > email.setHostName(SMTP_HOST); > email.addTo(EMAIL_TO, "DS"); > email.setFrom(EMAIL_FROM, "Me"); > email.setSubject(EMAIL_SUBJECT); > > 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 > email.send(); > 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. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.