From fe73ba96590e10205f2d4508a6181d31587c5c93 Mon Sep 17 00:00:00 2001 From: Nicolas Leroux Date: Fri, 15 Jan 2010 13:49:41 +0100 Subject: [PATCH] Mock mail costmetic changes --- framework/src/play/libs/Mail.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/src/play/libs/Mail.java b/framework/src/play/libs/Mail.java index 057547b00f..38af0a2fca 100644 --- a/framework/src/play/libs/Mail.java +++ b/framework/src/play/libs/Mail.java @@ -251,7 +251,7 @@ public static String getContent(Part message) throws MessagingException, IOException { if (message.getContent() instanceof String) { - return message.getContentType() + ": " + (String) message.getContent(); + return message.getContentType() + ": " + (String) message.getContent() + " \n\t"; } else if (message.getContent() != null && message.getContent() instanceof Multipart) { Multipart part = (Multipart) message.getContent(); String text = ""; @@ -269,7 +269,7 @@ public static String getContent(Part message) throws MessagingException, if (!Message.ATTACHMENT.equals(message.getDisposition())) { return getContent((Part) message.getContent()); } else { - return "attachment (" + message.getDisposition() + "): description " + message.getDescription() + " - name " + message.getFileName(); + return "attachment (" + message.getDisposition() + "): description: " + (message.getDescription() != null ? message.getDescription() : "none") + " - name: " + message.getFileName(); } } @@ -296,7 +296,7 @@ static void send(Email email) throws MessagingException { content.append("\n\tFrom: " + email.getFromAddress().getAddress()); content.append("\n\tReplyTo: " + ((InternetAddress) email.getReplyToAddresses().get(0)).getAddress()); content.append("\n\tSubject: " + email.getSubject()); - content.append("\n\tBody: " + body); + content.append("\n\t" + body); content.append("\n"); Logger.info(content.toString());