001 /*
002 * Copyright 2010 the original author or authors.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package com.hs.mail.imap.processor.fetch;
017
018 /**
019 * The envelope structure if the message. This is computed by the server by
020 * parsing the [RFC-2822] header into the component parts, defaulting various
021 * fields as necessary.
022 *
023 * @author Won Chul Doh
024 * @since Mar 8, 2010
025 *
026 */
027 public class Envelope {
028
029 private Address[] bcc;
030
031 private Address[] cc;
032
033 private String date;
034
035 private Address[] from;
036
037 private String inReplyTo;
038
039 private String messageId;
040
041 private Address[] replyTo;
042
043 private Address[] sender;
044
045 private String subject;
046
047 private Address[] to;
048
049 public Envelope(String date, String subject, Address[] from,
050 Address[] sender, final Address[] replyTo, Address[] to,
051 Address[] cc, final Address[] bcc, String inReplyTo,
052 String messageId) {
053 super();
054 this.date = date;
055 this.subject = subject;
056 this.from = from;
057 this.sender = sender;
058 this.replyTo = replyTo;
059 this.to = to;
060 this.cc = cc;
061 this.bcc = bcc;
062 this.inReplyTo = inReplyTo;
063 this.messageId = messageId;
064 }
065
066 public String getDate() {
067 return date;
068 }
069
070 public void setDate(String date) {
071 this.date = date;
072 }
073
074 public String getInReplyTo() {
075 return inReplyTo;
076 }
077
078 public void setInReplyTo(String inReplyTo) {
079 this.inReplyTo = inReplyTo;
080 }
081
082 public String getMessageId() {
083 return messageId;
084 }
085
086 public void setMessageId(String messageId) {
087 this.messageId = messageId;
088 }
089
090 public String getSubject() {
091 return subject;
092 }
093
094 public void setSubject(String subject) {
095 this.subject = subject;
096 }
097
098 public Address[] getBcc() {
099 return bcc;
100 }
101
102 public Address[] getCc() {
103 return cc;
104 }
105
106 public Address[] getFrom() {
107 return from;
108 }
109
110 public Address[] getReplyTo() {
111 return replyTo;
112 }
113
114 public Address[] getSender() {
115 return sender;
116 }
117
118 public Address[] getTo() {
119 return to;
120 }
121
122 }