https://issues.apache.org/bugzilla/show_bug.cgi?id=44644
--- Comment #4 from Curt Arnold <[EMAIL PROTECTED]> 2008-08-28 09:23:26 PST --- The layout does have the correct values for contentType. See http://en.wikipedia.org/wiki/MIME for a summary of the various fields of the MIME type (a little easier to read than the IETF RFC's). The problem is with the SMTPAppender does not properly encode the message into the form specified by the RFC. Could you try this and see if works for you? Will have to dig a little deeper to see what to do when a contentType other than "text/plain" is specified. ndex: src/main/java/org/apache/log4j/net/SMTPAppender.java =================================================================== --- src/main/java/org/apache/log4j/net/SMTPAppender.java (revision 686147) +++ src/main/java/org/apache/log4j/net/SMTPAppender.java (working copy) @@ -322,10 +322,15 @@ } } t = layout.getFooter(); - if(t != null) - sbuf.append(t); - part.setContent(sbuf.toString(), layout.getContentType()); - + if(t != null) { + sbuf.append(t); + } + String contentType = layout.getContentType(); + if (contentType == null || contentType.equals("text/plain")) { + part.setText(sbuf.toString(), "UTF-8"); + } else { + part.setContent(sbuf.toString(), contentType); + } Multipart mp = new MimeMultipart(); mp.addBodyPart(part); msg.setContent(mp); -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
