public interface AdminEmailMgrIf
Modifier and Type | Method and Description |
---|---|
com.konakart.bl.Emailer |
getEmailer() |
org.apache.velocity.VelocityContext |
getVelocityContext()
Returns the Velocity Context
|
void |
notifySysAdmin(java.lang.String message,
AdminEmailOptions options)
This method is used to send a template based eMail to the System Administrator.
|
void |
refreshConfigs()
Refresh the configuration of the Admin Email Manager
|
boolean |
sendEmail(AdminEmail adminEmailData)
To send an email
|
void |
sendHTML(java.lang.String toAddressString,
java.lang.String theSubject,
java.lang.String theContentHTML,
boolean doBlindCopy,
java.lang.String bccEmails,
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)
Deprecated.
|
void |
sendNewPasswordEmail1(java.lang.String emailAddr,
java.lang.String newPassword,
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(AdminOrder order,
int state)
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,
java.lang.String bccEmails,
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,
java.lang.String bccEmails,
boolean async)
Send a text-only email message to the specified recipient, with the specified subject and
text content.
|
boolean sendEmail(AdminEmail adminEmailData) throws KKAdminException
adminEmailData
- the Email object to fill out to define the email to sendKKAdminException
- typically when the email could not be sent@Deprecated void sendNewPasswordEmail(java.lang.String emailAddr, java.lang.String newPassword, java.lang.String mailSubject, java.lang.String countryCode) throws java.lang.Exception
emailAddr
- Email address to send to - the TO: addressnewPassword
- the new password that was randomly generatedmailSubject
- the email subject line. If null it is retrieved from the first line of the new
password template.countryCode
- country code (to pick the appropriate velocity template)java.lang.Exception
- an unexpected exceptionvoid sendNewPasswordEmail1(java.lang.String emailAddr, java.lang.String newPassword, java.lang.String countryCode) throws java.lang.Exception
emailAddr
- Email address to send to - the TO: addressnewPassword
- the new password that was randomly generatedcountryCode
- country code (to pick the appropriate velocity template)java.lang.Exception
- an unexpected exceptionvoid sendHTML(java.lang.String toAddressString, java.lang.String theSubject, java.lang.String theContentHTML, boolean doBlindCopy, java.lang.String bccEmails, boolean async) throws KKAdminException
toAddressString
- the TO: addresstheSubject
- the subject line of the emailtheContentHTML
- the HTML body of the emaildoBlindCopy
- if true the defined Blind Copy address will be addedbccEmails
- Semicolon separated list of blind copy email addresses.async
- set to true to send the mail asynchronously or false to send it synchronouslyKKAdminException
- an unexpected KKAdminException exceptionvoid sendText(java.lang.String toAddressString, java.lang.String theSubject, java.lang.String theContentText, boolean doBlindCopy, java.lang.String bccEmails, boolean async) throws KKAdminException
toAddressString
- the TO: addresstheSubject
- the subject line of the emailtheContentText
- the plain text body of the emaildoBlindCopy
- if true the defined Blind Copy address will be addedbccEmails
- Semicolon separated list of blind copy email addresses.async
- set to true to send the mail asynchronously or false to send it synchronouslyKKAdminException
- an unexpected KKAdminException exceptionvoid sendText(java.lang.String toAddressString, java.lang.String fromAddressString, java.lang.String replyToAddressString, java.lang.String theSubject, java.lang.String theContentText, boolean doBlindCopy, java.lang.String bccEmails, boolean async) throws KKAdminException
toAddressString
- TO: addressfromAddressString
- From addressreplyToAddressString
- reply to addresstheSubject
- the theSubjecttheContentText
- the plain text body of the emaildoBlindCopy
- if true the defined Blind Copy address will be addedbccEmails
- Semicolon separated list of blind copy email addresses.async
- set to true to send the mail asynchronously or false to send it synchronouslyKKAdminException
- an unexpected KKAdminException exceptionvoid sendStatusChangeEmailForState(int orderId, int state) throws java.lang.Exception
orderId
- the order Id of the order that has a changed statusstate
- the state of the orderjava.lang.Exception
- an unexpected exceptionvoid sendStatusChangeEmailForState(AdminOrder order, int state) throws java.lang.Exception
order
- the order that has a changed statusstate
- the state of the orderjava.lang.Exception
- an unexpected exceptionvoid sendStatusChangeEmail(int orderId) throws java.lang.Exception
orderId
- the order Id of the order that has a changed statusjava.lang.Exception
- an unexpected exceptioncom.konakart.bl.Emailer getEmailer() throws KKAdminException
KKAdminException
- an unexpected KKAdminException exceptionvoid 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
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.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
- the optionsjava.lang.Exception
- an unexpected exceptionvoid notifySysAdmin(java.lang.String message, AdminEmailOptions options) throws java.lang.Exception
Valid options are:
templateName
: The name of the template used to send the mail without the
country code and the .vm extension. e.g. If the name of the template is myTemplate and the
two letter country code is en, then KonaKart will search for a template called
myTemplate_en.vm .countryCode
: The two letter (lower case) country code used to search for the
template. e.g. en, de, es etc.customAttrs
: An array of name value pairs used to pass custom information to
the Velocity engine. The value can be retrieved from the template using the name preceded by
the $ sign. e.g. If a name value pair contains StoreId and 22, the value 22 will be displayed
in the eMail where the template contains $StoreId.fullAttachmentFilename
: The complete filename of an attachment.friendlyAttachmentName
: The friendly filename of an attachment that can be
viewed from the eMail.deleteAttachmentAfterSend
: When set to true
, the attachment is
deleted after being sent. The default value is false
.The Velocity context contains the following data:
customerName
: The name of the customer in the format firstName lastNamecustomer
: The CustomerIf objectmessage
: The message that may be used by the templatestoreOwner
: The name of the store owner.storeName
: The name of the store.storeOwnerEmailAddr
: The email address of the store owner.dateTool
: org.apache.velocity.tools.generic.DateTool object used to format
dates.locale
: java.util.Locale objectcurrencyMgr
: Used to format pricesmessage
- The information within the message may be used by the template. Typically this
might be an exception message.options
- Options for the emailjava.lang.Exception
- an unexpected exceptionorg.apache.velocity.VelocityContext getVelocityContext() throws java.lang.Exception
java.lang.Exception
- an unexpected exceptionvoid refreshConfigs() throws java.lang.Exception
java.lang.Exception
- an unexpected exceptionCopyright © 2018 DS Data Systems UK Ltd.