commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 30634] - [email] Issue with cid URLs generated by .embed(...) in HtmlEmail.java
Date Wed, 20 Oct 2004 15:25:39 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30634>.
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


Mime
View raw message