Author: sgoeschl Date: Thu Feb 5 17:13:01 2009 New Revision: 741184 URL: http://svn.apache.org/viewvc?rev=741184&view=rev Log: When writing a MimeMessage to a file create the required directory if its not already there.
Modified: commons/proper/email/trunk/src/java/org/apache/commons/mail/EmailUtils.java Modified: commons/proper/email/trunk/src/java/org/apache/commons/mail/EmailUtils.java URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/java/org/apache/commons/mail/EmailUtils.java?rev=741184&r1=741183&r2=741184&view=diff ============================================================================== --- commons/proper/email/trunk/src/java/org/apache/commons/mail/EmailUtils.java (original) +++ commons/proper/email/trunk/src/java/org/apache/commons/mail/EmailUtils.java Thu Feb 5 17:13:01 2009 @@ -249,6 +249,11 @@ throw new IllegalArgumentException( "resulFile is null"); } + if(resultFile.getParentFile() != null) + { + resultFile.getParentFile().mkdirs(); + } + try { fos = new FileOutputStream(resultFile);