org.unitils.mail.impl
Class SmtpMessageImpl

java.lang.Object
  extended by org.unitils.mail.impl.SmtpMessageImpl
All Implemented Interfaces:
SmtpMessage

public class SmtpMessageImpl
extends Object
implements SmtpMessage

Wrapper class for the SMTP message class of Wiser.

Author:
Jeroen Horemans, Thomas De Rycke, Willemijn Wouters

Constructor Summary
SmtpMessageImpl(String from, String subject, String body, List<String> to, List<String> cc, File... attachments)
           
SmtpMessageImpl(String from, String subject, String body, List<String> to, List<String> cc, List<String> bcc, File... attachments)
          Constructor of SmtpMessage.
SmtpMessageImpl(String from, String subject, String body, String to)
           
SmtpMessageImpl(String from, String subject, String body, String to, File... attachments)
           
SmtpMessageImpl(org.subethamail.wiser.WiserMessage message)
          Constructor of SmtpMessage.
 
Method Summary
 List<byte[]> getAttachments()
          This method give you the attachments of the email.
 List<String> getBcc()
          This will return the BCC addresses of the email.
 String getBody()
          This method gives you the text body of the email.
 List<String> getCc()
          This will return the CC addresses of the email.
 String getFrom()
          This method gives you the from header of the email.
 String getSubject()
          This method gives you the subject of the email .
 List<String> getTo()
          This method gives you the receiver of the email.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SmtpMessageImpl

public SmtpMessageImpl(String from,
                       String subject,
                       String body,
                       String to)
                throws IOException
Parameters:
from -
subject -
body -
to -
Throws:
IOException

SmtpMessageImpl

public SmtpMessageImpl(String from,
                       String subject,
                       String body,
                       String to,
                       File... attachments)
                throws IOException
Parameters:
from -
subject -
body -
to -
attachments -
Throws:
IOException

SmtpMessageImpl

public SmtpMessageImpl(String from,
                       String subject,
                       String body,
                       List<String> to,
                       List<String> cc,
                       File... attachments)
                throws IOException
Parameters:
from -
subject -
body -
to -
attachments -
Throws:
IOException

SmtpMessageImpl

public SmtpMessageImpl(String from,
                       String subject,
                       String body,
                       List<String> to,
                       List<String> cc,
                       List<String> bcc,
                       File... attachments)
                throws IOException
Constructor of SmtpMessage.

Parameters:
from -
subject -
body -
to -
cc -
bcc -
attachments -
Throws:
IOException

SmtpMessageImpl

public SmtpMessageImpl(org.subethamail.wiser.WiserMessage message)
                throws IOException,
                       javax.mail.MessagingException
Constructor of SmtpMessage.

Parameters:
message - of type SmtpMessage
Throws:
javax.mail.MessagingException
IOException
Method Detail

getBody

public String getBody()
Description copied from interface: SmtpMessage
This method gives you the text body of the email.

Specified by:
getBody in interface SmtpMessage
Returns:
String
See Also:
SmtpMessage.getBody()

getFrom

public String getFrom()
Description copied from interface: SmtpMessage
This method gives you the from header of the email.

Specified by:
getFrom in interface SmtpMessage
Returns:
the from

getSubject

public String getSubject()
Description copied from interface: SmtpMessage
This method gives you the subject of the email .

Specified by:
getSubject in interface SmtpMessage
Returns:
the subject

getTo

public List<String> getTo()
Description copied from interface: SmtpMessage
This method gives you the receiver of the email.

Specified by:
getTo in interface SmtpMessage
Returns:
the to

getAttachments

public List<byte[]> getAttachments()
Description copied from interface: SmtpMessage
This method give you the attachments of the email.

Specified by:
getAttachments in interface SmtpMessage
Returns:
List

getBcc

public List<String> getBcc()
Description copied from interface: SmtpMessage
This will return the BCC addresses of the email.

Specified by:
getBcc in interface SmtpMessage
Returns:
List

getCc

public List<String> getCc()
Description copied from interface: SmtpMessage
This will return the CC addresses of the email.

Specified by:
getCc in interface SmtpMessage
Returns:
String

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2013. All Rights Reserved.