org.codehaus.plexus.mailsender
Class MailMessage
java.lang.Object
org.codehaus.plexus.mailsender.MailMessage
- Direct Known Subclasses:
- SimpleMailMessage
public class MailMessage
- extends Object
- Version:
- $Id: MailMessage.java 5555 2007-02-01 15:17:45Z evenisse $
- Author:
- Trygve Laugstøl, Emmanuel Venisse
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TYPE_HTML
public static final String TYPE_HTML
- See Also:
- Constant Field Values
TYPE_TEXT
public static final String TYPE_TEXT
- See Also:
- Constant Field Values
MailMessage
public MailMessage()
getFrom
public MailMessage.Address getFrom()
setFrom
public void setFrom(String mailbox,
String name)
throws MailSenderException
- Throws:
MailSenderException
setFrom
public void setFrom(MailMessage.Address from)
getReplyTo
public MailMessage.Address getReplyTo()
setReplyTo
public void setReplyTo(String mailbox,
String name)
throws MailSenderException
- Throws:
MailSenderException
setReplyTo
public void setReplyTo(MailMessage.Address replyTo)
getToAddresses
public List getToAddresses()
addTo
public void addTo(String mailbox,
String name)
throws MailSenderException
- Throws:
MailSenderException
addTo
public void addTo(MailMessage.Address to)
throws MailSenderException
- Throws:
MailSenderException
getCcAddresses
public List getCcAddresses()
addCc
public void addCc(String mailbox,
String name)
throws MailSenderException
- Throws:
MailSenderException
addCc
public void addCc(MailMessage.Address cc)
throws MailSenderException
- Throws:
MailSenderException
getBccAddresses
public List getBccAddresses()
addBcc
public void addBcc(String mailbox,
String name)
throws MailSenderException
- Throws:
MailSenderException
addBcc
public void addBcc(MailMessage.Address bcc)
throws MailSenderException
- Throws:
MailSenderException
getSubject
public String getSubject()
setSubject
public void setSubject(String subject)
getContent
public String getContent()
setContent
public void setContent(String content)
getContentType
public String getContentType()
setContentType
public void setContentType(String contentType)
getSendDate
public Date getSendDate()
setSendDate
public void setSendDate(Date sendDate)
getHeaders
public Map getHeaders()
addHeader
public void addHeader(String headerName,
String headerValue)
- Adds the given value to the headers identified by headerName.
RFC 822 provides the rules for what text may constitute a header name and
value.
- Parameters:
headerName
- the name of the header to append this value toheaderValue
- the value to append
setHeader
public List setHeader(String headerName,
String headerValue)
- Sets the named header to the given value. RFC 822 provides the rules for
what text may constitute a header name and value.
- Parameters:
headerName
- the named header to setheaderValue
- the value to set
- Returns:
- the List of values that was previously set under this headerName
Copyright © 2001-2012 Codehaus. All Rights Reserved.