org.unitils.mail.impl
Class SmtpMessageImpl

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

public class SmtpMessageImpl
extends java.lang.Object
implements SmtpMessage

Wrapper class for the SMTP message class of Wiser.

Author:
Jeroen Horemans, Thomas De Rycke, Willemijn Wouters

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

Constructor Detail

SmtpMessageImpl

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

SmtpMessageImpl

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

SmtpMessageImpl

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

SmtpMessageImpl

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

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

SmtpMessageImpl

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

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

getBody

public java.lang.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 java.lang.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 java.lang.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 java.util.List<java.lang.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 java.util.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 java.util.List<java.lang.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 java.util.List<java.lang.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 java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()


Copyright © 2013-2014. All Rights Reserved.