JAMES-2361 Extract MDN report type in a constant

Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/12bbac5c
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/12bbac5c
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/12bbac5c

Branch: refs/heads/master
Commit: 12bbac5c59341efd95e520556ba0891eabe28acb
Parents: de8f7b2
Author: benwa <[email protected]>
Authored: Mon Apr 2 09:53:23 2018 +0700
Committer: benwa <[email protected]>
Committed: Tue Apr 3 17:01:39 2018 +0700

----------------------------------------------------------------------
 mdn/src/main/java/org/apache/james/mdn/MDN.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/12bbac5c/mdn/src/main/java/org/apache/james/mdn/MDN.java
----------------------------------------------------------------------
diff --git a/mdn/src/main/java/org/apache/james/mdn/MDN.java 
b/mdn/src/main/java/org/apache/james/mdn/MDN.java
index 1e4e542..082c6ce 100644
--- a/mdn/src/main/java/org/apache/james/mdn/MDN.java
+++ b/mdn/src/main/java/org/apache/james/mdn/MDN.java
@@ -47,6 +47,7 @@ public class MDN {
 
     public static final String DISPOSITION_CONTENT_TYPE = 
"message/disposition-notification";
     public static final String REPORT_SUB_TYPE = "report";
+    public static final String DISPOSITION_NOTIFICATION_REPORT_TYPE = 
"disposition-notification";
 
     public static class Builder {
         private String humanReadableText;
@@ -96,7 +97,7 @@ public class MDN {
     public MimeMultipart asMultipart() throws MessagingException {
         MimeMultipartReport multipart = new MimeMultipartReport();
         multipart.setSubType(REPORT_SUB_TYPE);
-        multipart.setReportType("disposition-notification");
+        multipart.setReportType(DISPOSITION_NOTIFICATION_REPORT_TYPE);
         multipart.addBodyPart(computeHumanReadablePart());
         multipart.addBodyPart(computeReportPart());
         // The optional third part, the original message is omitted.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to