email.java

来自「BEA WebLogic Server 8.1大全 = BEA webLogic」· Java 代码 · 共 143 行

JAVA
143
字号
/* 
 * WebLogic Server Unleashed
 * 
 */


package com.wlsunleashed.xml.sax.email;

import java.util.Vector;


/**
 * This class represents an e-mail.
 * 
 * @version 1.0
 */
public class EMail {
    /** A list of "from" addresses */
    EMailAddress fromAddress = null;

    /** All email options */
    EMailOptions options = null;

    /** The email body */
    String body = null;

    /** The subject of the email */
    String subject = null;

    /** A list of "cc" addresses */
    Vector ccAddresses = new Vector();

    /** A list of "to" addresses */
    Vector toAddresses = new Vector();

    /**
     * Sets the body.
     * 
     * @param body The body to set
     */
    public void setBody(String body) {
        this.body = body;
    }

    /**
     * Returns the body.
     * 
     * @return String
     */
    public String getBody() {
        return body;
    }

    /**
     * Returns the ccAddresses.
     * 
     * @return Vector
     */
    public Vector getCcAddresses() {
        return ccAddresses;
    }

    /**
     * Sets the fromAddress.
     * 
     * @param fromAddress The fromAddress to set
     */
    public void setFromAddress(EMailAddress fromAddress) {
        this.fromAddress = fromAddress;
    }

    /**
     * Returns the fromAddress.
     * 
     * @return EMailAddress
     */
    public EMailAddress getFromAddress() {
        return fromAddress;
    }

    /**
     * Sets the options.
     * 
     * @param options The options to set
     */
    public void setOptions(EMailOptions options) {
        this.options = options;
    }

    /**
     * Returns the options.
     * 
     * @return EMailOptions
     */
    public EMailOptions getOptions() {
        return options;
    }

    /**
     * Sets the subject.
     * 
     * @param subject The subject to set
     */
    public void setSubject(String subject) {
        this.subject = subject;
    }

    /**
     * Returns the subject.
     * 
     * @return String
     */
    public String getSubject() {
        return subject;
    }

    /**
     * Returns the toAddresses.
     * 
     * @return Vector
     */
    public Vector getToAddresses() {
        return toAddresses;
    }

    /**
     * Adds a cc address
     * 
     * @param anAddress anAddress
     */
    public void addCcAddress(EMailAddress anAddress) {
        ccAddresses.add(anAddress);
    }

    /**
     * Adds a to address
     * 
     * @param anAddress anAddress
     */
    public void addToAddress(EMailAddress anAddress) {
        toAddresses.add(anAddress);
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?