public class

SimpleMailMessage

extends Object
implements Serializable MailMessage
java.lang.Object
   ↳ org.springframework.mail.SimpleMailMessage

Class Overview

Models a simple mail message, including data such as the from, to, cc, subject, and text fields.

Consider JavaMailSender and JavaMail MimeMessages for creating more sophisticated messages, for example messages with attachments, special character encodings, or personal names that accompany mail addresses.

Summary

Public Constructors
SimpleMailMessage()
Create a new SimpleMailMessage.
SimpleMailMessage(SimpleMailMessage original)
Copy constructor for creating a new SimpleMailMessage from the state of an existing SimpleMailMessage instance.
Public Methods
void copyTo(MailMessage target)
Copy the contents of this message to the given target message.
boolean equals(Object other)
String[] getBcc()
String[] getCc()
String getFrom()
String getReplyTo()
Date getSentDate()
String getSubject()
String getText()
String[] getTo()
int hashCode()
void setBcc(String[] bcc)
void setBcc(String bcc)
void setCc(String cc)
void setCc(String[] cc)
void setFrom(String from)
void setReplyTo(String replyTo)
void setSentDate(Date sentDate)
void setSubject(String subject)
void setText(String text)
void setTo(String to)
void setTo(String[] to)
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.mail.MailMessage

Public Constructors

public SimpleMailMessage ()

Create a new SimpleMailMessage.

public SimpleMailMessage (SimpleMailMessage original)

Copy constructor for creating a new SimpleMailMessage from the state of an existing SimpleMailMessage instance.

Throws
IllegalArgumentException if the supplied message is null

Public Methods

public void copyTo (MailMessage target)

Copy the contents of this message to the given target message.

Parameters
target the MailMessage to copy to
Throws
IllegalArgumentException if the supplied target is null

public boolean equals (Object other)

public String[] getBcc ()

public String[] getCc ()

public String getFrom ()

public String getReplyTo ()

public Date getSentDate ()

public String getSubject ()

public String getText ()

public String[] getTo ()

public int hashCode ()

public void setBcc (String[] bcc)

public void setBcc (String bcc)

public void setCc (String cc)

public void setCc (String[] cc)

public void setFrom (String from)

public void setReplyTo (String replyTo)

public void setSentDate (Date sentDate)

public void setSubject (String subject)

public void setText (String text)

public void setTo (String to)

public void setTo (String[] to)

public String toString ()