Skip to content
Permalink
Browse files
fixing an build break with multipart messages
  • Loading branch information
Supun Kamburugamuva committed Jan 23, 2012
1 parent 12a62a4 commit f3412628e0b5afb0924be472fbb4c0a9e3d1c24c
Showing 2 changed files with 10 additions and 0 deletions.
@@ -60,6 +60,7 @@ public class MailConstants {
public static final String TRANSPORT_MAIL_FORMAT = "transport.mail.Format";
public static final String TRANSPORT_FORMAT_TEXT = "Text";
public static final String TRANSPORT_FORMAT_MP = "Multipart";
public static final String TRANSPORT_FORMAT_ATTACHMENT = "Attachment";
public static final String TRANSPORT_FORMAT_ATTACHMENT_FILE = "AttachmentFile";

public static final String TRANSPORT_MAIL_FOLDER = "transport.mail.Folder";
@@ -433,6 +433,15 @@ private String sendMail(MailOutTransportInfo outInfo, MessageContext msgContext)
mimeMultiPart.addBodyPart(mimeBodyPart1);
mimeMultiPart.addBodyPart(mimeBodyPart2);
message.setContent(mimeMultiPart);
mainPart = mimeBodyPart2;
} else if (MailConstants.TRANSPORT_FORMAT_ATTACHMENT.equals(mFormat)) {
mimeMultiPart = new MimeMultipart();
MimeBodyPart mimeBodyPart1 = new MimeBodyPart();
mimeBodyPart1.setContent("Web Service Message Attached","text/plain");
MimeBodyPart mimeBodyPart2 = new MimeBodyPart();
mimeMultiPart.addBodyPart(mimeBodyPart1);
mimeMultiPart.addBodyPart(mimeBodyPart2);
message.setContent(mimeMultiPart);

String fileName = (String) msgContext.getProperty(
MailConstants.TRANSPORT_FORMAT_ATTACHMENT_FILE);

0 comments on commit f341262

Please sign in to comment.