001: /****************************************************************
002: * Licensed to the Apache Software Foundation (ASF) under one *
003: * or more contributor license agreements. See the NOTICE file *
004: * distributed with this work for additional information *
005: * regarding copyright ownership. The ASF licenses this file *
006: * to you under the Apache License, Version 2.0 (the *
007: * "License"); you may not use this file except in compliance *
008: * with the License. You may obtain a copy of the License at *
009: * *
010: * http://www.apache.org/licenses/LICENSE-2.0 *
011: * *
012: * Unless required by applicable law or agreed to in writing, *
013: * software distributed under the License is distributed on an *
014: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
015: * KIND, either express or implied. See the License for the *
016: * specific language governing permissions and limitations *
017: * under the License. *
018: ****************************************************************/package org.apache.mailet;
019:
020: /**
021: * This utility class provides the set of header names explicitly defined in RFC 2822
022: *
023: */
024: public class RFC2822Headers {
025:
026: // See Section 3.6.1 of RFC 2822
027:
028: /**
029: * The name of the RFC 2822 header that stores the mail date.
030: */
031: public final static String DATE = "Date";
032:
033: // See Section 3.6.2 of RFC 2822
034:
035: /**
036: * The name of the RFC 2822 header that stores the mail author(s).
037: */
038: public final static String FROM = "From";
039:
040: /**
041: * The name of the RFC 2822 header that stores the actual mail transmission agent,
042: * if this differs from the author of the message.
043: */
044: public final static String SENDER = "Sender";
045:
046: /**
047: * The name of the RFC 2822 header that stores the reply-to address.
048: */
049: public final static String REPLY_TO = "Reply-To";
050:
051: // See Section 3.6.3 of RFC 2822
052:
053: /**
054: * The name of the RFC 2822 header that stores the primary mail recipients.
055: */
056: public final static String TO = "To";
057:
058: /**
059: * The name of the RFC 2822 header that stores the carbon copied mail recipients.
060: */
061: public final static String CC = "Cc";
062:
063: /**
064: * The name of the RFC 2822 header that stores the blind carbon copied mail recipients.
065: */
066: public final static String BCC = "Bcc";
067:
068: // See Section 3.6.4 of RFC 2822
069:
070: /**
071: * The name of the RFC 2822 header that stores the message id.
072: */
073: public final static String MESSAGE_ID = "Message-ID";
074:
075: /**
076: * A common variation on the name of the RFC 2822 header that
077: * stores the message id. This is needed for certain filters and
078: * processing of incoming mail.
079: */
080: public final static String MESSAGE_ID_VARIATION = "Message-Id";
081:
082: /**
083: * The name of the RFC 2822 header that stores the message id of the message
084: * that to which this email is a reply.
085: */
086: public final static String IN_REPLY_TO = "In-Reply-To";
087:
088: /**
089: * The name of the RFC 2822 header that is used to identify the thread to
090: * which this message refers.
091: */
092: public final static String REFERENCES = "References";
093:
094: // See Section 3.6.5 of RFC 2822
095:
096: /**
097: * The name of the RFC 2822 header that stores the subject.
098: */
099: 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:
178: }
|