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     ****************************************************************/
019    
020    
021    package org.apache.mailet.base;
022    
023    /**
024     * This utility class provides the set of header names explicitly defined in RFC 2822
025     *
026     */
027    public class RFC2822Headers  {
028    
029        // See Section 3.6.1 of RFC 2822
030    
031        /**
032         * The name of the RFC 2822 header that stores the mail date.
033         */
034        public final static String DATE = "Date";
035    
036        // See Section 3.6.2 of RFC 2822
037    
038        /**
039         * The name of the RFC 2822 header that stores the mail author(s).
040         */
041        public final static String FROM = "From";
042    
043        /**
044         * The name of the RFC 2822 header that stores the actual mail transmission agent,
045         * if this differs from the author of the message.
046         */
047        public final static String SENDER = "Sender";
048    
049        /**
050         * The name of the RFC 2822 header that stores the reply-to address.
051         */
052        public final static String REPLY_TO = "Reply-To";
053    
054        // See Section 3.6.3 of RFC 2822
055    
056        /**
057         * The name of the RFC 2822 header that stores the primary mail recipients.
058         */
059        public final static String TO = "To";
060    
061        /**
062         * The name of the RFC 2822 header that stores the carbon copied mail recipients.
063         */
064        public final static String CC = "Cc";
065    
066        /**
067         * The name of the RFC 2822 header that stores the blind carbon copied mail recipients.
068         */
069        public final static String BCC = "Bcc";
070    
071        // See Section 3.6.4 of RFC 2822
072    
073        /**
074         * The name of the RFC 2822 header that stores the message id.
075         */
076        public final static String MESSAGE_ID = "Message-ID";
077    
078        /**
079         * A common variation on the name of the RFC 2822 header that
080         * stores the message id.  This is needed for certain filters and
081         * processing of incoming mail.
082         */
083        public final static String MESSAGE_ID_VARIATION = "Message-Id";
084    
085        /**
086         * The name of the RFC 2822 header that stores the message id of the message
087         * that to which this email is a reply.
088         */
089        public final static String IN_REPLY_TO = "In-Reply-To";
090    
091        /**
092         * The name of the RFC 2822 header that is used to identify the thread to
093         * which this message refers.
094         */
095        public final static String REFERENCES = "References";
096    
097        // See Section 3.6.5 of RFC 2822
098    
099        /**
100         * The name of the RFC 2822 header that stores the subject.
101         */
102        public final static String SUBJECT = "Subject";
103    
104        /**
105         * The name of the RFC 2822 header that stores human-readable comments.
106         */
107        public final static String COMMENTS = "Comments";
108    
109        /**
110         * The name of the RFC 2822 header that stores human-readable keywords.
111         */
112        public final static String KEYWORDS = "Keywords";
113    
114        // See Section 3.6.6 of RFC 2822
115    
116        /**
117         * The name of the RFC 2822 header that stores the date the message was resent.
118         */
119        public final static String RESENT_DATE = "Resent-Date";
120    
121        /**
122         * The name of the RFC 2822 header that stores the originator of the resent message.
123         */
124        public final static String RESENT_FROM = "Resent-From";
125    
126        /**
127         * The name of the RFC 2822 header that stores the transmission agent
128         * of the resent message.
129         */
130        public final static String RESENT_SENDER = "Resent-Sender";
131    
132        /**
133         * The name of the RFC 2822 header that stores the recipients
134         * of the resent message.
135         */
136        public final static String RESENT_TO = "Resent-To";
137    
138        /**
139         * The name of the RFC 2822 header that stores the carbon copied recipients
140         * of the resent message.
141         */
142        public final static String RESENT_CC = "Resent-Cc";
143    
144        /**
145         * The name of the RFC 2822 header that stores the blind carbon copied recipients
146         * of the resent message.
147         */
148        public final static String RESENT_BCC = "Resent-Bcc";
149    
150        /**
151         * The name of the RFC 2822 header that stores the message id
152         * of the resent message.
153         */
154        public final static String RESENT_MESSAGE_ID = "Resent-Message-ID";
155    
156        // See Section 3.6.7 of RFC 2822
157    
158        /**
159         * The name of the RFC 2822 headers that store the tracing data for the return path.
160         */
161        public final static String RETURN_PATH = "Return-Path";
162    
163        /**
164         * The name of the RFC 2822 headers that store additional tracing data.
165         */
166        public final static String RECEIVED = "Received";
167    
168        // MIME headers
169    
170        /**
171         * The name of the MIME header that stores the content type.
172         */
173        public final static String CONTENT_TYPE = "Content-Type";
174    
175        /**
176         * Private constructor to prevent instantiation
177         */
178        private RFC2822Headers() {}
179    
180    }