com.elasticpath.commons.util.impl
Class MailerImpl

java.lang.Object
  extended by com.elasticpath.commons.util.impl.MailerImpl
All Implemented Interfaces:
Mailer

public final class MailerImpl
extends java.lang.Object
implements Mailer

This class is responsible for generating email body and sending email.


Constructor Summary
MailerImpl()
           
 
Method Summary
 void sendEmail()
          Send a text email.
 void sendHtmlEmail()
          Send an html email.
 Mailer setAddressBCC(java.lang.String addressBCC)
          Setter for property addressBCC.
 Mailer setAddressCC(java.lang.String addressCC)
          Setter for property addressCC.
 Mailer setAddressFrom(java.lang.String addressFrom)
          Setter for property addressFrom.
 Mailer setAddressTo(java.lang.String addressTo)
          Setter for property addressTo.
 Mailer setBody(java.lang.String body)
          Setter for property body.
 Mailer setBodyHtml(java.lang.String bodyHtml)
          Setter for property html body.
 void setElasticPath(ElasticPath elasticPath)
          Sets the context instance ElasticPath.
 Mailer setFromName(java.lang.String fromName)
          Setter for property from name.
 Mailer setMailHost(java.lang.String mailHost)
          Setter for property mail host.
 Mailer setMailPort(java.lang.String mailPort)
          Setter for property mail port.
 Mailer setReturnPath(java.lang.String returnPath)
          Setter for property return path.
 Mailer setSubject(java.lang.String subject)
          Setter for property subject.
 Mailer setToName(java.lang.String toName)
          Setter for property to name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailerImpl

public MailerImpl()
Method Detail

sendEmail

public void sendEmail()
               throws EpSystemException
Send a text email.

Specified by:
sendEmail in interface Mailer
Throws:
EpSystemException - on failure

sendHtmlEmail

public void sendHtmlEmail()
                   throws EpSystemException
Send an html email.

Specified by:
sendHtmlEmail in interface Mailer
Throws:
EpSystemException - on failure

setAddressBCC

public Mailer setAddressBCC(java.lang.String addressBCC)
Setter for property addressBCC.

Specified by:
setAddressBCC in interface Mailer
Parameters:
addressBCC - New value of property addressBCC
Returns:
the mailer itself

setAddressCC

public Mailer setAddressCC(java.lang.String addressCC)
Setter for property addressCC.

Specified by:
setAddressCC in interface Mailer
Parameters:
addressCC - New value of property addressCC.
Returns:
the mailer itself

setAddressFrom

public Mailer setAddressFrom(java.lang.String addressFrom)
Setter for property addressFrom.

Specified by:
setAddressFrom in interface Mailer
Parameters:
addressFrom - New value of property addressFrom.
Returns:
the mailer itself

setAddressTo

public Mailer setAddressTo(java.lang.String addressTo)
Setter for property addressTo.

Specified by:
setAddressTo in interface Mailer
Parameters:
addressTo - New value of property addressTo
Returns:
the mailer itself

setBody

public Mailer setBody(java.lang.String body)
Setter for property body.

Specified by:
setBody in interface Mailer
Parameters:
body - New value of property body.
Returns:
the mailer itself

setBodyHtml

public Mailer setBodyHtml(java.lang.String bodyHtml)
Setter for property html body.

Specified by:
setBodyHtml in interface Mailer
Parameters:
bodyHtml - New value of property html body.
Returns:
the mailer itself

setElasticPath

public void setElasticPath(ElasticPath elasticPath)
Sets the context instance ElasticPath.

Parameters:
elasticPath - the context instance ElasticPath.

setFromName

public Mailer setFromName(java.lang.String fromName)
Setter for property from name.

Specified by:
setFromName in interface Mailer
Parameters:
fromName - body New value of property from name.
Returns:
the mailer itself

setMailHost

public Mailer setMailHost(java.lang.String mailHost)
Setter for property mail host.

Specified by:
setMailHost in interface Mailer
Parameters:
mailHost - body New value of property mail host.
Returns:
the mailer itself

setMailPort

public Mailer setMailPort(java.lang.String mailPort)
Setter for property mail port.

Specified by:
setMailPort in interface Mailer
Parameters:
mailPort - New value of property mail port.
Returns:
the mailer itself

setReturnPath

public Mailer setReturnPath(java.lang.String returnPath)
Setter for property return path.

Specified by:
setReturnPath in interface Mailer
Parameters:
returnPath - body New value of property return path.
Returns:
the mailer itself

setSubject

public Mailer setSubject(java.lang.String subject)
Setter for property subject.

Specified by:
setSubject in interface Mailer
Parameters:
subject - New value of property subject.
Returns:
the mailer itself

setToName

public Mailer setToName(java.lang.String toName)
Setter for property to name.

Specified by:
setToName in interface Mailer
Parameters:
toName - body New value of property to name.
Returns:
the mailer itself