1 17 package org.apache.james.util.mail; 18 19 import javax.activation.DataSource ; 20 import javax.mail.MessagingException ; 21 import javax.mail.internet.ContentType ; 22 import javax.mail.internet.MimeMultipart ; 23 24 28 public class MimeMultipartReport extends MimeMultipart 29 { 30 31 34 public MimeMultipartReport() 35 { 36 this("report"); 37 } 38 39 43 public MimeMultipartReport(String subtype) 44 { 45 super(subtype); 46 } 47 48 53 public MimeMultipartReport(DataSource aDataSource) throws MessagingException 54 { 55 super(aDataSource); 56 } 57 58 63 public void setReportType(String reportType) throws MessagingException 64 { 65 ContentType contentType = new ContentType (getContentType()); 66 contentType.setParameter("report-type", reportType); 67 setContentType(contentType); 68 } 69 70 74 protected void setContentType(ContentType aContentType) 75 { 76 contentType = aContentType.toString(); 77 } 78 79 } 80 | Popular Tags |