OpMath

com.opmath.mail.lite
Class MailMessage

java.lang.Object
  |
  +--javax.mail.Message
        |
        +--javax.mail.internet.MimeMessage
              |
              +--com.opmath.mail.lite.MailMessage
All Implemented Interfaces:
javax.mail.internet.MimePart, javax.mail.Part

public class MailMessage
extends javax.mail.internet.MimeMessage

A MimeMessage that is compatible with the email sending strategy used by com.opmath.mail.lite.MailClient. The purpose of this class is to allow for environment-independent email message objects.

Copyright: (c) 2003 The Open Math Company Limited

The Terms of Distribution of this software are stipulated in the javadoc Overview for this project.

Since:
J2SE 1.4.1
Version:
1.0
Author:
Bruno Beloff bruno.beloff@opmath.com

Inner classes inherited from class javax.mail.internet.MimeMessage
javax.mail.internet.MimeMessage.RecipientType
 
Inner classes inherited from class javax.mail.Message
javax.mail.Message.RecipientType
 
Fields inherited from class javax.mail.internet.MimeMessage
content, contentStream, dh, flags, headers, modified, saved
 
Fields inherited from class javax.mail.Message
expunged, folder, msgnum, session
 
Fields inherited from interface javax.mail.Part
ATTACHMENT, INLINE
 
Constructor Summary
MailMessage(javax.mail.Session session, String subject, javax.mail.internet.InternetAddress from, String to, String cc, String bcc, String text)
          Constructs an email message.
MailMessage(javax.mail.Session session, String subject, javax.mail.internet.InternetAddress from, String to, String cc, String bcc, String text, javax.activation.DataSource data, String dataName)
          Constructs an email message with an attachment.
 
Methods inherited from class javax.mail.internet.MimeMessage
, addFrom, addHeader, addHeaderLine, addRecipients, addRecipients, createInternetHeaders, getAllHeaderLines, getAllHeaders, getAllRecipients, getContent, getContentID, getContentLanguage, getContentMD5, getContentStream, getContentType, getDataHandler, getDescription, getDisposition, getEncoding, getFileName, getFlags, getFrom, getHeader, getHeader, getInputStream, getLineCount, getMatchingHeaderLines, getMatchingHeaders, getMessageID, getNonMatchingHeaderLines, getNonMatchingHeaders, getRawInputStream, getReceivedDate, getRecipients, getReplyTo, getSentDate, getSize, getSubject, isMimeType, isSet, parse, removeHeader, reply, saveChanges, setContent, setContent, setContentID, setContentLanguage, setContentMD5, setDataHandler, setDescription, setDescription, setDisposition, setFileName, setFlags, setFrom, setFrom, setHeader, setRecipients, setRecipients, setReplyTo, setSentDate, setSubject, setSubject, setText, setText, updateHeaders, writeTo, writeTo
 
Methods inherited from class javax.mail.Message
addRecipient, getFolder, getMessageNumber, isExpunged, match, setExpunged, setFlag, setMessageNumber, setRecipient
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailMessage

public MailMessage(javax.mail.Session session,
                   String subject,
                   javax.mail.internet.InternetAddress from,
                   String to,
                   String cc,
                   String bcc,
                   String text,
                   javax.activation.DataSource data,
                   String dataName)
            throws javax.mail.MessagingException
Constructs an email message with an attachment.

There are only four obligatory parameters for the constructor:

Where a paremeter value is not required, it may be given as null.

Parameters:
session - the Session of the email client.
subject - a String subject text, or null.
from - the InternetAddress of the sender.
to - a String list of email addresses.
cc - a String list of email addresses, or null.
bcc - a String list of email addresses, or null.
text - a String ascii plain text message, or null.
data - a DataSource for the attachment, or null.
dataName - a String name for the data, or null.
Throws:
javax.mail.MessagingException - If the message could not be constructed.

MailMessage

public MailMessage(javax.mail.Session session,
                   String subject,
                   javax.mail.internet.InternetAddress from,
                   String to,
                   String cc,
                   String bcc,
                   String text)
            throws javax.mail.MessagingException
Constructs an email message.

There are only three obligatory parameters for the constructor:

Where a paremeter value is not required, it may be given as null.

Parameters:
session - the Session of the email client.
subject - a String subject text, or null.
from - the InternetAddress of the sender.
to - a String list of email addresses.
cc - a String list of email addresses, or null.
bcc - a String list of email addresses, or null.
text - a String ascii plain text message, or null.
Throws:
javax.mail.MessagingException - If the message could not be constructed.

OpMath

Submit a bug or feature to Open Math
Copyright © 2003 Open Math Company Limited, Brighton, UK