View Javadoc

1   /************************************************************************
2    * Copyright (c) 2000-2006 The Apache Software Foundation.             *
3    * All rights reserved.                                                *
4    * ------------------------------------------------------------------- *
5    * Licensed under the Apache License, Version 2.0 (the "License"); you *
6    * may not use this file except in compliance with the License. You    *
7    * may obtain a copy of the License at:                                *
8    *                                                                     *
9    *     http://www.apache.org/licenses/LICENSE-2.0                      *
10   *                                                                     *
11   * Unless required by applicable law or agreed to in writing, software *
12   * distributed under the License is distributed on an "AS IS" BASIS,   *
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or     *
14   * implied.  See the License for the specific language governing       *
15   * permissions and limitations under the License.                      *
16   ***********************************************************************/
17  
18  package org.apache.mailet;
19  
20  /***
21   * This utility class provides the set of header names explicitly defined in RFC 2822
22   *
23   */
24  public class RFC2822Headers  {
25  
26      // See Section 3.6.1 of RFC 2822
27  
28      /***
29       * The name of the RFC 2822 header that stores the mail date.
30       */
31      public final static String DATE = "Date";
32  
33      // See Section 3.6.2 of RFC 2822
34  
35      /***
36       * The name of the RFC 2822 header that stores the mail author(s).
37       */
38      public final static String FROM = "From";
39  
40      /***
41       * The name of the RFC 2822 header that stores the actual mail transmission agent,
42       * if this differs from the author of the message.
43       */
44      public final static String SENDER = "Sender";
45  
46      /***
47       * The name of the RFC 2822 header that stores the reply-to address.
48       */
49      public final static String REPLY_TO = "Reply-To";
50  
51      // See Section 3.6.3 of RFC 2822
52  
53      /***
54       * The name of the RFC 2822 header that stores the primary mail recipients.
55       */
56      public final static String TO = "To";
57  
58      /***
59       * The name of the RFC 2822 header that stores the carbon copied mail recipients.
60       */
61      public final static String CC = "Cc";
62  
63      /***
64       * The name of the RFC 2822 header that stores the blind carbon copied mail recipients.
65       */
66      public final static String BCC = "Bcc";
67  
68      // See Section 3.6.4 of RFC 2822
69  
70      /***
71       * The name of the RFC 2822 header that stores the message id.
72       */
73      public final static String MESSAGE_ID = "Message-ID";
74  
75      /***
76       * A common variation on the name of the RFC 2822 header that
77       * stores the message id.  This is needed for certain filters and
78       * processing of incoming mail.
79       */
80      public final static String MESSAGE_ID_VARIATION = "Message-Id";
81  
82      /***
83       * The name of the RFC 2822 header that stores the message id of the message
84       * that to which this email is a reply.
85       */
86      public final static String IN_REPLY_TO = "In-Reply-To";
87  
88      /***
89       * The name of the RFC 2822 header that is used to identify the thread to
90       * which this message refers.
91       */
92      public final static String REFERENCES = "References";
93  
94      // See Section 3.6.5 of RFC 2822
95  
96      /***
97       * The name of the RFC 2822 header that stores the subject.
98       */
99      public final static String SUBJECT = "Subject";
100 
101     /***
102      * The name of the RFC 2822 header that stores human-readable comments.
103      */
104     public final static String COMMENTS = "Comments";
105 
106     /***
107      * The name of the RFC 2822 header that stores human-readable keywords.
108      */
109     public final static String KEYWORDS = "Keywords";
110 
111     // See Section 3.6.6 of RFC 2822
112 
113     /***
114      * The name of the RFC 2822 header that stores the date the message was resent.
115      */
116     public final static String RESENT_DATE = "Resent-Date";
117 
118     /***
119      * The name of the RFC 2822 header that stores the originator of the resent message.
120      */
121     public final static String RESENT_FROM = "Resent-From";
122 
123     /***
124      * The name of the RFC 2822 header that stores the transmission agent
125      * of the resent message.
126      */
127     public final static String RESENT_SENDER = "Resent-Sender";
128 
129     /***
130      * The name of the RFC 2822 header that stores the recipients
131      * of the resent message.
132      */
133     public final static String RESENT_TO = "Resent-To";
134 
135     /***
136      * The name of the RFC 2822 header that stores the carbon copied recipients
137      * of the resent message.
138      */
139     public final static String RESENT_CC = "Resent-Cc";
140 
141     /***
142      * The name of the RFC 2822 header that stores the blind carbon copied recipients
143      * of the resent message.
144      */
145     public final static String RESENT_BCC = "Resent-Bcc";
146 
147     /***
148      * The name of the RFC 2822 header that stores the message id
149      * of the resent message.
150      */
151     public final static String RESENT_MESSAGE_ID = "Resent-Message-ID";
152 
153     // See Section 3.6.7 of RFC 2822
154 
155     /***
156      * The name of the RFC 2822 headers that store the tracing data for the return path.
157      */
158     public final static String RETURN_PATH = "Return-Path";
159 
160     /***
161      * The name of the RFC 2822 headers that store additional tracing data.
162      */
163     public final static String RECEIVED = "Received";
164 
165     // MIME headers
166 
167     /***
168      * The name of the MIME header that stores the content type.
169      */
170     public final static String CONTENT_TYPE = "Content-Type";
171 
172     /***
173      * Private constructor to prevent instantiation
174      */
175     private RFC2822Headers() {}
176 
177 }