home *** CD-ROM | disk | FTP | other *** search
- package com.bitmechanic.smtp;
-
- import java.util.Hashtable;
- import java.util.Vector;
-
- public class MailMessage {
- private Vector toList;
- private Vector ccList;
- private Vector bccList;
- private String from;
- private String subject;
- private StringBuffer body;
- private Hashtable headers;
-
- public MailMessage(String[] var1, String var2, String var3, String var4) {
- this();
- this.body.append(var4);
- this.from = var2;
- this.subject = var3;
- if (var1 != null) {
- for(int var5 = 0; var5 < var1.length; ++var5) {
- this.addTo(var1[var5]);
- }
- }
-
- }
-
- public MailMessage(String var1, String var2, String var3, String var4) {
- this();
- this.body.append(var4);
- this.from = var2;
- this.subject = var3;
- this.addTo(var1);
- }
-
- public MailMessage() {
- this.headers = new Hashtable();
- this.toList = new Vector();
- this.ccList = new Vector();
- this.bccList = new Vector();
- this.body = new StringBuffer();
- }
-
- public void addTo(String var1) {
- this.toList.addElement(var1);
- }
-
- public String[] getToList() {
- String[] var1 = new String[this.toList.size()];
- this.toList.copyInto(var1);
- return var1;
- }
-
- public void clearToList() {
- this.toList.removeAllElements();
- }
-
- public void addCC(String var1) {
- this.ccList.addElement(var1);
- }
-
- public String[] getCCList() {
- String[] var1 = new String[this.ccList.size()];
- this.ccList.copyInto(var1);
- return var1;
- }
-
- public void clearCCList() {
- this.ccList.removeAllElements();
- }
-
- public void addBCC(String var1) {
- this.bccList.addElement(var1);
- }
-
- public String[] getBCCList() {
- String[] var1 = new String[this.bccList.size()];
- this.bccList.copyInto(var1);
- return var1;
- }
-
- public void clearBCCList() {
- this.bccList.removeAllElements();
- }
-
- public void setFrom(String var1) {
- this.from = var1;
- }
-
- public String getFrom() {
- return this.from;
- }
-
- public void setSubject(String var1) {
- this.subject = var1;
- }
-
- public String getSubject() {
- return this.subject;
- }
-
- public void setBody(String var1) {
- this.body.setLength(0);
- this.body.append(var1);
- }
-
- public void appendBody(String var1) {
- this.body.append(var1);
- }
-
- public String getBody() {
- return this.body.toString();
- }
-
- public void clearBody() {
- this.body.setLength(0);
- }
-
- public void addHeader(String var1, String var2) {
- if (var2 == null) {
- this.headers.remove(var1);
- } else {
- this.headers.put(var1, var2);
- }
- }
-
- public Hashtable getHeaders() {
- return this.headers;
- }
- }
-