com.konakartadmin.blif
Interface AdminEmailMgrIf

All Known Implementing Classes:
AdminEmailMgr

public interface AdminEmailMgrIf

AdminEmailMgrIf


Method Summary
 com.konakart.bl.Emailer getEmailer()
           
 boolean sendEmail(AdminEmail adminEmailData)
          To send an email
 void sendHTML(java.lang.String toAddressString, java.lang.String theSubject, java.lang.String theContentHTML, boolean doBlindCopy, boolean async)
          Send a HTML-only email message to the specified recipient, with the specified subject and HTML content.
 void sendNewPasswordEmail(java.lang.String emailAddr, java.lang.String newPassword, java.lang.String mailSubject, java.lang.String countryCode)
          Send out an email notifying a user of a new password
 void sendStatusChangeEmail(int orderId)
          A status change email is sent when the status of an order is changed
 void sendStatusChangeEmailForState(int orderId, int state)
          A status change email is sent when the status of an order is changed.
 void sendTemplateEmail(AdminCustomer customer, java.lang.String templateName, java.lang.Object obj1, java.lang.Object obj2, java.lang.Object obj3, java.lang.Object obj4, java.lang.Object obj5, AdminEmailOptions options)
          An email is sent to the customer.
 void sendText(java.lang.String toAddressString, java.lang.String theSubject, java.lang.String theContentText, boolean doBlindCopy, boolean async)
          Send a text-only email message to the specified recipient, with the specified subject and text content.
 void sendText(java.lang.String toAddressString, java.lang.String fromAddressString, java.lang.String replyToAddressString, java.lang.String theSubject, java.lang.String theContentText, boolean doBlindCopy, boolean async)
          Send a text-only email message to the specified recipient, with the specified subject and text content.
 

Method Detail

sendEmail

boolean sendEmail(AdminEmail adminEmailData)
                  throws KKAdminException
To send an email

Parameters:
adminEmailData - the Email object to fill out to define the email to send
Returns:
true if the email is sent successfully, and exception is raised in other cases
Throws:
KKAdminException - typically when the email could not be sent

sendNewPasswordEmail

void sendNewPasswordEmail(java.lang.String emailAddr,
                          java.lang.String newPassword,
                          java.lang.String mailSubject,
                          java.lang.String countryCode)
                          throws java.lang.Exception
Send out an email notifying a user of a new password

Parameters:
emailAddr - Email address to send to - the TO: address
newPassword - the new password that was randomly generated
mailSubject - the email subject line
countryCode - country code (to pick the appropriate velocity template)
Throws:
java.lang.Exception

sendHTML

void sendHTML(java.lang.String toAddressString,
              java.lang.String theSubject,
              java.lang.String theContentHTML,
              boolean doBlindCopy,
              boolean async)
              throws KKAdminException
Send a HTML-only email message to the specified recipient, with the specified subject and HTML content.

Parameters:
toAddressString - the TO: address
theSubject - the subject line of the email
theContentHTML - the HTML body of the email
doBlindCopy - if true the defined Blind Copy address will be added
async - set to true to send the mail asynchronously or false to send it synchronously
Throws:
KKAdminException

sendText

void sendText(java.lang.String toAddressString,
              java.lang.String theSubject,
              java.lang.String theContentText,
              boolean doBlindCopy,
              boolean async)
              throws KKAdminException
Send a text-only email message to the specified recipient, with the specified subject and text content.

Parameters:
toAddressString - the TO: address
theSubject - the subject line of the email
theContentText - the plain text body of the email
doBlindCopy - if true the defined Blind Copy address will be added
async - set to true to send the mail asynchronously or false to send it synchronously
Throws:
KKAdminException

sendText

void sendText(java.lang.String toAddressString,
              java.lang.String fromAddressString,
              java.lang.String replyToAddressString,
              java.lang.String theSubject,
              java.lang.String theContentText,
              boolean doBlindCopy,
              boolean async)
              throws KKAdminException
Send a text-only email message to the specified recipient, with the specified subject and text content.

Parameters:
toAddressString - TO: address
fromAddressString - From address
replyToAddressString - reply to address
theSubject -
theContentText - the plain text body of the email
doBlindCopy - if true the defined Blind Copy address will be added
async - set to true to send the mail asynchronously or false to send it synchronously
Throws:
KKAdminException

sendStatusChangeEmailForState

void sendStatusChangeEmailForState(int orderId,
                                   int state)
                                   throws java.lang.Exception
A status change email is sent when the status of an order is changed. A different template can be picked up depending on the state of the order. Set state to -1 to pick up the default template.

Parameters:
orderId - the order Id of the order whose status has changed
state - the state of the order
Throws:
java.lang.Exception

sendStatusChangeEmail

void sendStatusChangeEmail(int orderId)
                           throws java.lang.Exception
A status change email is sent when the status of an order is changed

Parameters:
orderId - the order Id of the order whose status has changed
Throws:
java.lang.Exception

getEmailer

com.konakart.bl.Emailer getEmailer()
                                   throws KKAdminException
Returns:
Returns a new Emailer.
Throws:
KKAdminException

sendTemplateEmail

void sendTemplateEmail(AdminCustomer customer,
                       java.lang.String templateName,
                       java.lang.Object obj1,
                       java.lang.Object obj2,
                       java.lang.Object obj3,
                       java.lang.Object obj4,
                       java.lang.Object obj5,
                       AdminEmailOptions options)
                       throws java.lang.Exception
An email is sent to the customer. The email is generated by the template called templateName and the objects obj1-obj5 are passed to the template. The subject of the eMail is picked up from the first line of the template.

Parameters:
customer - The customer to which the eMail will be sent. It will be passed to the velocity template with the name "cust".
templateName - The name of the template. The country code and .vm will be appended automatically. i.e. If the template name is newsletter and the country code is en, then we will look for a file called newsletter_en.vm. This file should be in the classpath.
obj1 - This object will be passed to the velocity template with the name "obj1".
obj2 - This object will be passed to the velocity template with the name "obj2".
obj3 - This object will be passed to the velocity template with the name "obj3".
obj4 - This object will be passed to the velocity template with the name "obj4".
obj5 - This object will be passed to the velocity template with the name "obj5".
options -
Throws:
java.lang.Exception


Copyright © 2011 DS Data Systems UK Ltd.