org.apache.turbine.util.mail
Class Email

java.lang.Object
  extended byorg.apache.turbine.util.mail.Email
Direct Known Subclasses:
MultiPartEmail, SimpleEmail

Deprecated. Use org.apache.commons.mail.Email instead.

public abstract class Email
extends java.lang.Object

The base class for all email messages. This class sets the sender's email & name, receiver's email & name, subject, and the sent date. Subclasses are responsible for setting the message body.

Version:
$Id: Email.java 264148 2005-08-29 14:21:04Z henning $
Author:
Jon S. Stevens, Frank Y. Kim, Brett McLaughlin, Greg Ritter, Regis Koenig, Henning P. Schmiedehausen

Field Summary
static java.lang.String ATTACHMENTS
          Deprecated.  
protected  java.lang.String charset
          Deprecated. The charset to use for this message
static java.lang.String CONTENT_TYPE
          Deprecated.  
static java.lang.String EMAIL_BODY
          Deprecated.  
static java.lang.String EMAIL_SUBJECT
          Deprecated.  
static java.lang.String FILE_SERVER
          Deprecated.  
static java.lang.String ISO_8859_1
          Deprecated.  
static java.lang.String KOI8_R
          Deprecated.  
static java.lang.String MAIL_HOST
          Deprecated. Mail Host, for javax.mail
static java.lang.String MAIL_SERVER
          Deprecated. Use TurbineConstants.MAIL_SERVER_KEY
static java.lang.String MAIL_SMTP_FROM
          Deprecated. Use TurbineConstants.MAIL_SMTP_FROM
static java.lang.String MAIL_TRANSPORT_PROTOCOL
          Deprecated.  
protected  javax.mail.internet.MimeMessage message
          Deprecated. The email message to send.
static java.lang.String RECEIVER_EMAIL
          Deprecated.  
static java.lang.String RECEIVER_NAME
          Deprecated.  
static java.lang.String SENDER_EMAIL
          Deprecated. Constants used to Email classes.
static java.lang.String SENDER_NAME
          Deprecated.  
static java.lang.String SMTP
          Deprecated.  
static java.lang.String TEXT_HTML
          Deprecated.  
static java.lang.String TEXT_PLAIN
          Deprecated.  
static java.lang.String US_ASCII
          Deprecated.  
 
Constructor Summary
Email()
          Deprecated.  
 
Method Summary
 Email addBcc(java.lang.String email, java.lang.String name)
          Deprecated. Add a blind BCC recipient to the email.
 Email addCc(java.lang.String email, java.lang.String name)
          Deprecated. Add a recipient CC to the email.
 Email addReplyTo(java.lang.String email, java.lang.String name)
          Deprecated. Add a reply to address to the email.
 Email addTo(java.lang.String email, java.lang.String name)
          Deprecated. Add a recipient TO to the email.
protected  void init()
          Deprecated. Initializes the mail.
protected  void initCriteria(org.apache.torque.util.Criteria criteria)
          Deprecated. Initialize the mail according to the Criteria.
protected  void initialize(org.apache.torque.util.Criteria criteria)
          Deprecated. Initializes the mail.
 void send()
          Deprecated. Does the work of actually sending the email.
 void setCharset(java.lang.String charset)
          Deprecated. Set the charset of the message.
 Email setFrom(java.lang.String email, java.lang.String name)
          Deprecated. Set the FROM field of the email.
abstract  Email setMsg(java.lang.String msg)
          Deprecated. Define the content of the mail.
 Email setSentDate(java.util.Date date)
          Deprecated. Set the sent date field.
 Email setSubject(java.lang.String subject)
          Deprecated. Set the email subject.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SENDER_EMAIL

public static final java.lang.String SENDER_EMAIL
Deprecated. 
Constants used to Email classes.

See Also:
Constant Field Values

SENDER_NAME

public static final java.lang.String SENDER_NAME
Deprecated. 
See Also:
Constant Field Values

RECEIVER_EMAIL

public static final java.lang.String RECEIVER_EMAIL
Deprecated. 
See Also:
Constant Field Values

RECEIVER_NAME

public static final java.lang.String RECEIVER_NAME
Deprecated. 
See Also:
Constant Field Values

EMAIL_SUBJECT

public static final java.lang.String EMAIL_SUBJECT
Deprecated. 
See Also:
Constant Field Values

EMAIL_BODY

public static final java.lang.String EMAIL_BODY
Deprecated. 
See Also:
Constant Field Values

CONTENT_TYPE

public static final java.lang.String CONTENT_TYPE
Deprecated. 
See Also:
Constant Field Values

MAIL_SERVER

public static final java.lang.String MAIL_SERVER
Deprecated. Use TurbineConstants.MAIL_SERVER_KEY

See Also:
Constant Field Values

MAIL_SMTP_FROM

public static final java.lang.String MAIL_SMTP_FROM
Deprecated. Use TurbineConstants.MAIL_SMTP_FROM

See Also:
Constant Field Values

MAIL_HOST

public static final java.lang.String MAIL_HOST
Deprecated. 
Mail Host, for javax.mail

See Also:
Constant Field Values

MAIL_TRANSPORT_PROTOCOL

public static final java.lang.String MAIL_TRANSPORT_PROTOCOL
Deprecated. 
See Also:
Constant Field Values

SMTP

public static final java.lang.String SMTP
Deprecated. 
See Also:
Constant Field Values

TEXT_HTML

public static final java.lang.String TEXT_HTML
Deprecated. 
See Also:
Constant Field Values

TEXT_PLAIN

public static final java.lang.String TEXT_PLAIN
Deprecated. 
See Also:
Constant Field Values

ATTACHMENTS

public static final java.lang.String ATTACHMENTS
Deprecated. 
See Also:
Constant Field Values

FILE_SERVER

public static final java.lang.String FILE_SERVER
Deprecated. 
See Also:
Constant Field Values

KOI8_R

public static final java.lang.String KOI8_R
Deprecated. 
See Also:
Constant Field Values

ISO_8859_1

public static final java.lang.String ISO_8859_1
Deprecated. 
See Also:
Constant Field Values

US_ASCII

public static final java.lang.String US_ASCII
Deprecated. 
See Also:
Constant Field Values

message

protected javax.mail.internet.MimeMessage message
Deprecated. 
The email message to send.


charset

protected java.lang.String charset
Deprecated. 
The charset to use for this message

Constructor Detail

Email

public Email()
Deprecated. 
Method Detail

setCharset

public void setCharset(java.lang.String charset)
Deprecated. 
Set the charset of the message.

Parameters:
charset - A String.

initialize

protected void initialize(org.apache.torque.util.Criteria criteria)
                   throws javax.mail.MessagingException
Deprecated. 
Initializes the mail. Deprecated.

Parameters:
criteria - A Criteria.
Throws:
MessagingException.
javax.mail.MessagingException
See Also:
init.

init

protected void init()
             throws javax.mail.MessagingException
Deprecated. 
Initializes the mail.

This is the first method that should be called by a subclass in its constructor.

Throws:
MessagingException.
javax.mail.MessagingException

initCriteria

protected void initCriteria(org.apache.torque.util.Criteria criteria)
                     throws javax.mail.MessagingException
Deprecated. 
Initialize the mail according to the Criteria.

This method uses the criteria parameter to set the from, to and subject fields of the email. Deprecated; one should use the setFrom, addTo, etc. methods.

Parameters:
criteria - A Criteria.
Throws:
MessagingException.
javax.mail.MessagingException

setFrom

public Email setFrom(java.lang.String email,
                     java.lang.String name)
              throws javax.mail.MessagingException
Deprecated. 
Set the FROM field of the email.

Parameters:
email - A String.
name - A String.
Returns:
An Email.
Throws:
MessagingException.
javax.mail.MessagingException

addTo

public Email addTo(java.lang.String email,
                   java.lang.String name)
            throws javax.mail.MessagingException
Deprecated. 
Add a recipient TO to the email.

Parameters:
email - A String.
name - A String.
Returns:
An Email.
Throws:
MessagingException.
javax.mail.MessagingException

addCc

public Email addCc(java.lang.String email,
                   java.lang.String name)
            throws javax.mail.MessagingException
Deprecated. 
Add a recipient CC to the email.

Parameters:
email - A String.
name - A String.
Returns:
An Email.
Throws:
MessagingException.
javax.mail.MessagingException

addBcc

public Email addBcc(java.lang.String email,
                    java.lang.String name)
             throws javax.mail.MessagingException
Deprecated. 
Add a blind BCC recipient to the email.

Parameters:
email - A String.
name - A String.
Returns:
An Email.
Throws:
MessagingException.
javax.mail.MessagingException

addReplyTo

public Email addReplyTo(java.lang.String email,
                        java.lang.String name)
                 throws javax.mail.MessagingException
Deprecated. 
Add a reply to address to the email.

Parameters:
email - A String.
name - A String.
Returns:
An Email.
Throws:
MessagingException.
javax.mail.MessagingException

setSubject

public Email setSubject(java.lang.String subject)
                 throws javax.mail.MessagingException
Deprecated. 
Set the email subject.

Parameters:
subject - A String.
Returns:
An Email.
Throws:
MessagingException.
javax.mail.MessagingException

setSentDate

public Email setSentDate(java.util.Date date)
                  throws javax.mail.MessagingException
Deprecated. 
Set the sent date field.

Parameters:
date - A Date.
Returns:
An Email.
Throws:
MessagingException.
javax.mail.MessagingException

setMsg

public abstract Email setMsg(java.lang.String msg)
                      throws javax.mail.MessagingException
Deprecated. 
Define the content of the mail. It should be overidden by the subclasses.

Parameters:
msg - A String.
Returns:
An Email.
Throws:
MessagingException.
javax.mail.MessagingException

send

public void send()
          throws javax.mail.MessagingException
Deprecated. 
Does the work of actually sending the email.

Throws:
MessagingException, - if there was an error.
javax.mail.MessagingException


Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.