1 /**************************************************************** 2 * Licensed to the Apache Software Foundation (ASF) under one * 3 * or more contributor license agreements. See the NOTICE file * 4 * distributed with this work for additional information * 5 * regarding copyright ownership. The ASF licenses this file * 6 * to you under the Apache License, Version 2.0 (the * 7 * "License"); you may not use this file except in compliance * 8 * with the License. You may obtain a copy of the License at * 9 * * 10 * http://www.apache.org/licenses/LICENSE-2.0 * 11 * * 12 * Unless required by applicable law or agreed to in writing, * 13 * software distributed under the License is distributed on an * 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * 15 * KIND, either express or implied. See the License for the * 16 * specific language governing permissions and limitations * 17 * under the License. * 18 ****************************************************************/ 19 20 21 package org.apache.mailet.base; 22 23 /** 24 * This utility class provides the set of header names explicitly defined in RFC 2822 25 * 26 */ 27 public class RFC2822Headers { 28 29 // See Section 3.6.1 of RFC 2822 30 31 /** 32 * The name of the RFC 2822 header that stores the mail date. 33 */ 34 public final static String DATE = "Date"; 35 36 // See Section 3.6.2 of RFC 2822 37 38 /** 39 * The name of the RFC 2822 header that stores the mail author(s). 40 */ 41 public final static String FROM = "From"; 42 43 /** 44 * The name of the RFC 2822 header that stores the actual mail transmission agent, 45 * if this differs from the author of the message. 46 */ 47 public final static String SENDER = "Sender"; 48 49 /** 50 * The name of the RFC 2822 header that stores the reply-to address. 51 */ 52 public final static String REPLY_TO = "Reply-To"; 53 54 // See Section 3.6.3 of RFC 2822 55 56 /** 57 * The name of the RFC 2822 header that stores the primary mail recipients. 58 */ 59 public final static String TO = "To"; 60 61 /** 62 * The name of the RFC 2822 header that stores the carbon copied mail recipients. 63 */ 64 public final static String CC = "Cc"; 65 66 /** 67 * The name of the RFC 2822 header that stores the blind carbon copied mail recipients. 68 */ 69 public final static String BCC = "Bcc"; 70 71 // See Section 3.6.4 of RFC 2822 72 73 /** 74 * The name of the RFC 2822 header that stores the message id. 75 */ 76 public final static String MESSAGE_ID = "Message-ID"; 77 78 /** 79 * A common variation on the name of the RFC 2822 header that 80 * stores the message id. This is needed for certain filters and 81 * processing of incoming mail. 82 */ 83 public final static String MESSAGE_ID_VARIATION = "Message-Id"; 84 85 /** 86 * The name of the RFC 2822 header that stores the message id of the message 87 * that to which this email is a reply. 88 */ 89 public final static String IN_REPLY_TO = "In-Reply-To"; 90 91 /** 92 * The name of the RFC 2822 header that is used to identify the thread to 93 * which this message refers. 94 */ 95 public final static String REFERENCES = "References"; 96 97 // See Section 3.6.5 of RFC 2822 98 99 /** 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 }