ninja.postoffice.common
Class MailImpl

java.lang.Object
  extended by ninja.postoffice.common.MailImpl
All Implemented Interfaces:
Mail

public class MailImpl
extends Object
implements Mail

Simple implementation of Mail. Does nothing special. In particular it does NOT validate any content.

Author:
rbauer

Constructor Summary
MailImpl()
           
 
Method Summary
 void addBcc(String... bccs)
          In general email addresses could look like: Joe Jocker or joe@joe.com.
 void addCc(String... ccs)
          In general email addresses could look like: Joe Jocker or joe@joe.com.
 void addHeader(String key, String value)
           
 void addReplyTo(String... replyTos)
          In general email addresses could look like: Joe Jocker or joe@joe.com.
 void addTo(String... tos)
          In general email addresses could look like: Joe Jocker or joe@joe.com.
 Collection<String> getBccs()
           
 String getBodyHtml()
           
 String getBodyText()
           
 Collection<String> getCcs()
           
 String getCharset()
           
 String getFrom()
           
 Map<String,String> getHeaders()
           
 Collection<String> getReplyTo()
           
 String getSubject()
           
 Collection<String> getTos()
           
 void setBodyHtml(String bodyHtml)
           
 void setBodyText(String bodyText)
           
 void setCharset(String charset)
           
 void setFrom(String from)
          In general email addresses could look like: Joe Jocker or joe@joe.com.
 void setSubject(String subject)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailImpl

public MailImpl()
Method Detail

setSubject

public void setSubject(String subject)
Specified by:
setSubject in interface Mail

setFrom

public void setFrom(String from)
Description copied from interface: Mail
In general email addresses could look like: Joe Jocker or joe@joe.com. Make sure your implementation and / or your mailer can handle these.

Specified by:
setFrom in interface Mail

addReplyTo

public void addReplyTo(String... replyTos)
Description copied from interface: Mail
In general email addresses could look like: Joe Jocker or joe@joe.com. Make sure your implementation and / or your mailer can handle these.

Specified by:
addReplyTo in interface Mail

setCharset

public void setCharset(String charset)
Specified by:
setCharset in interface Mail

addHeader

public void addHeader(String key,
                      String value)
Specified by:
addHeader in interface Mail

addCc

public void addCc(String... ccs)
Description copied from interface: Mail
In general email addresses could look like: Joe Jocker or joe@joe.com. Make sure your implementation and / or your mailer can handle these.

Specified by:
addCc in interface Mail

addBcc

public void addBcc(String... bccs)
Description copied from interface: Mail
In general email addresses could look like: Joe Jocker or joe@joe.com. Make sure your implementation and / or your mailer can handle these.

Specified by:
addBcc in interface Mail

addTo

public void addTo(String... tos)
Description copied from interface: Mail
In general email addresses could look like: Joe Jocker or joe@joe.com. Make sure your implementation and / or your mailer can handle these.

Specified by:
addTo in interface Mail

getSubject

public String getSubject()
Specified by:
getSubject in interface Mail

getFrom

public String getFrom()
Specified by:
getFrom in interface Mail

getReplyTo

public Collection<String> getReplyTo()
Specified by:
getReplyTo in interface Mail

getCharset

public String getCharset()
Specified by:
getCharset in interface Mail

getHeaders

public Map<String,String> getHeaders()
Specified by:
getHeaders in interface Mail

getCcs

public Collection<String> getCcs()
Specified by:
getCcs in interface Mail

getBccs

public Collection<String> getBccs()
Specified by:
getBccs in interface Mail

getTos

public Collection<String> getTos()
Specified by:
getTos in interface Mail

setBodyHtml

public void setBodyHtml(String bodyHtml)
Specified by:
setBodyHtml in interface Mail

getBodyHtml

public String getBodyHtml()
Specified by:
getBodyHtml in interface Mail

setBodyText

public void setBodyText(String bodyText)
Specified by:
setBodyText in interface Mail

getBodyText

public String getBodyText()
Specified by:
getBodyText in interface Mail


Copyright © 2012. All Rights Reserved.