Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 25696 invoked from network); 20 Oct 2004 15:23:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 20 Oct 2004 15:23:47 -0000 Received: (qmail 68768 invoked by uid 500); 20 Oct 2004 15:23:40 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 68607 invoked by uid 500); 20 Oct 2004 15:23:39 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 68593 invoked by uid 99); 20 Oct 2004 15:23:39 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [192.18.33.10] (HELO exchange.sun.com) (192.18.33.10) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 20 Oct 2004 08:23:37 -0700 Received: (qmail 29093 invoked by uid 50); 20 Oct 2004 15:25:39 -0000 Date: 20 Oct 2004 15:25:39 -0000 Message-ID: <20041020152539.29092.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: commons-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 30634] - [email] Issue with cid URLs generated by .embed(...) in HtmlEmail.java X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=30634 [email] Issue with cid URLs generated by .embed(...) in HtmlEmail.java ------- Additional Comments From corey.scott@gmail.com 2004-10-20 15:25 ------- Here is the patch that does as suggested (generates an alphanumeric string) with no unacceptable chars: Index: HtmlEmail.java =================================================================== RCS file: /home/cvspublic/jakarta-commons- sandbox/email/src/java/org/apache/commons/mail/HtmlEmail.java,v retrieving revision 1.9 diff -u -r1.9 HtmlEmail.java --- HtmlEmail.java 18 Oct 2004 20:59:11 -0000 1.9 +++ HtmlEmail.java 20 Oct 2004 15:22:18 -0000 @@ -158,8 +158,9 @@ mbp.setDataHandler ( new DataHandler( new URLDataSource( url ) ) ); mbp.setFileName( name ); mbp.setDisposition( "inline" ); - String cid = RandomStringUtils.randomAscii( 10 ); - mbp.addHeader( "Content-ID", cid ); + + String cid = RandomStringUtils.randomAlphanumeric(10); + mbp.addHeader( "Content-ID", cid ); this.inlineImages.add( mbp ); return mbp.getContentID(); --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org