Skip to content

Commit

Permalink
Mock mail costmetic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pepite committed Jan 15, 2010
1 parent 465b02a commit fe73ba9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions framework/src/play/libs/Mail.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "";
Expand All @@ -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();
}
}

Expand All @@ -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());
Expand Down

0 comments on commit fe73ba9

Please sign in to comment.