public class EmailMgr extends BaseMgr implements EmailMgrIf
Modifier and Type | Class and Description |
---|---|
protected class |
EmailMgr.StaticData
Used to store the external mail module
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
debugEmail
debugEmail
|
protected boolean |
displayPricesWithTax
displayPricesWithTax
|
protected static java.lang.String |
emailMgrMutex
Mutex for the email manager
|
protected java.lang.String |
imageBase
imageBase
|
protected static org.apache.commons.logging.Log |
log
the log
|
protected java.lang.String |
logFileDirectory
logFileDirectory
|
static java.lang.String |
LOW_STOCK_ALERT_TEMPLATE
Name of template for sending the Low Stock Alert eMail
|
static java.lang.String |
MANUAL_REGISTRATION_VERIFICATION
Name of template for sending the Registration Check eMail
|
static java.lang.String |
NEW_PASSWORD_TEMPLATE
Name of template for sending the new password eMail
|
static java.lang.String |
ORDER_CONFIRMATION_TEMPLATE
Name of template for sending the Order Confirmation eMail
|
protected java.lang.String |
pdfBase
pdfBase
|
static java.lang.String |
REGISTRATION_CHECK
Name of template for sending the Registration Check eMail
|
protected boolean |
sendEmails
sendEmails
|
protected boolean |
sendNewPasswordEmails
sendNewPasswordEmails
|
protected boolean |
sendOrderConfEmails
sendOrderConfEmails
|
protected boolean |
sendStockReordeEmails
sendStockReordeEmails
|
protected boolean |
sendWelcomeEmails
sendWelcomeEmails
|
protected static java.util.Map<java.lang.String,EmailMgr.StaticData> |
staticDataHM
Hash Map that contains the static data
|
protected java.lang.String |
storeName
storeName
|
protected java.lang.String |
storeOwner
storeOwner
|
protected java.lang.String |
storeOwnerEmailAddr
storeOwnerEmailAddr
|
protected java.lang.String |
sysAdminEmailAddress
sysAdminEmailAddress
|
static java.lang.String |
WELCOME_TEMPLATE
Name of template for sending the Welcome eMail
|
templateBaseDir
Modifier and Type | Method and Description |
---|---|
Emailer |
getEmailer()
Used to get a new Emailer object used to send the E mails
|
java.lang.String |
getFormattedCustomerName(Customer cust)
Returns the customer name formatted by the template in the configuration variable
|
protected org.apache.velocity.VelocityContext |
getVelocityContext(EmailOptionsIf options)
Returns the Velocity Context
|
protected VelocityContextMgrIf |
getVelocityContextMgr() |
protected org.apache.velocity.app.VelocityEngine |
getVelocityEngine() |
boolean |
isEmailValid(java.lang.String emailAddr)
Determines whether the eMail address is valid
|
protected boolean |
isExternalMailEnabled(EmailMgr.StaticData sd)
Method to determine whether an external mail module is enabled
|
EmailIf |
notifySysAdmin(java.lang.String message,
EmailOptionsIf options) |
protected void |
putCustomAttrsInContext(org.apache.velocity.VelocityContext context,
NameValueIf[] customAttrs)
protected method used to populate the Velocity context with custom attributes
|
void |
refreshConfigs()
Setup the external mail module class.
|
protected void |
refreshPrivateConfigs()
Setup variables needed to send the mail.
|
void |
saveEmailContents(java.lang.String toAddr,
int contentType,
java.lang.String templateName,
boolean doBCC,
java.lang.String subject,
java.lang.String body,
java.lang.String addTofileName)
Write the mail contents to a file which is handy for diagnosing problems
|
void |
saveEmailContents(java.lang.String toAddr,
int contentType,
java.lang.String templateName,
boolean doBCC,
java.lang.String subject,
java.lang.String body,
java.lang.String addTofileName,
EmailOptionsIf options)
Write the mail contents to a file which is handy for diagnosing problems
|
protected boolean |
sendExternalMail(org.apache.velocity.VelocityContext context,
java.lang.String konakartAPI,
java.lang.String emailAddr,
EmailTemplate emailTemplate,
EmailOptionsIf options)
If an external mail module has been defined and it is active then it is called to send the
mail
|
void |
sendHTML(EmailOptionsIf options)
Send a HTML-only email message to the specified recipient, with the options all specified in
the EmailOptions object.
|
void |
sendHTML(java.lang.String toAddressString,
java.lang.String theSubject,
java.lang.String theContentHTML,
boolean doBlindCopy,
boolean async,
EmailOptionsIf options)
Send a HTML-only email message to the specified recipient, with the specified subject and
HTML content.
|
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 |
sendHTML(java.lang.String toAddressString,
java.lang.String theSubject,
java.lang.String theContentHTML,
boolean doBlindCopy,
java.lang.String fullAttachmentFilename,
java.lang.String friendlyAttachmentName,
boolean deleteAttachmentAfterSend,
java.lang.String bccEmails,
boolean async)
Send a HTML-only email message to the specified recipient, with the specified subject, HTML
content and attachment options.
|
void |
sendHTML(java.lang.String toAddressString,
java.lang.String fromAddressString,
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 and fromAddress, with the specified
subject and HTML content.
|
void |
sendHTML(java.lang.String toAddressString,
java.lang.String fromAddressString,
java.lang.String replyToAddressString,
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 and fromAddress, with the specified
subject and HTML content.
|
void |
sendMail(int contentType,
java.lang.String toAddressString,
java.lang.String theSubject,
java.lang.String theContent,
boolean doBlindCopy,
boolean async)
Send a HTML-only email message to the specified recipient, with the specified subject and
HTML content.
|
void |
sendMail(int contentType,
java.lang.String toAddressString,
java.lang.String theSubject,
java.lang.String theContent,
boolean doBlindCopy,
boolean async,
EmailOptionsIf options)
Send a HTML-only email message to the specified recipient, with the specified subject and
HTML content.
|
void |
sendMail(int contentType,
java.lang.String toAddressString,
java.lang.String theSubject,
java.lang.String theContent,
boolean doBlindCopy,
java.lang.String fullAttachmentFilename,
java.lang.String friendlyAttachmentName,
boolean deleteAttachmentAfterSend,
boolean async)
Send a HTML-only email message to the specified recipient, with the specified subject and
HTML content.
|
void |
sendMail(java.lang.String toAddressString,
java.lang.String theSubject,
java.lang.String theContent,
boolean doBlindCopy,
boolean async,
EmailOptionsIf options)
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 subject,
java.lang.String countryCode)
Deprecated.
|
EmailIf |
sendNewPasswordEmail1(java.lang.String emailAddr,
java.lang.String newPassword,
Customer cust,
EmailOptionsIf options)
Sends a new password to user who has forgotten password.
|
void |
sendOrderConfirmationEmail(java.lang.String sessionId,
int orderId,
java.lang.String subject,
int languageId)
Deprecated.
|
EmailIf |
sendOrderConfirmationEmail1(java.lang.String sessionId,
int orderId,
int langIdForOrder,
EmailOptionsIf options)
An order confirmation email is sent after submitting an order.
|
void |
sendStockReorderEmail(java.lang.String emailAddr,
java.lang.String productName,
int productQuantity,
int productId,
java.lang.String sku)
Send an email to warn that a product stock level has fallen below a pre defined level
|
EmailIf |
sendTemplateEmailTo(int customerId,
java.lang.String message,
EmailOptionsIf options)
Used to send a template based email to a receiver
|
void |
sendTemplateEmailToCustomer(int customerId,
java.lang.String templateName,
java.lang.String message,
java.lang.String countryCode)
Deprecated.
|
void |
sendText(EmailOptionsIf options)
Send a Text email message to the specified recipient, with the options all specified in the
EmailOptions object.
|
void |
sendText(java.lang.String toAddressString,
java.lang.String theSubject,
java.lang.String theContentText,
boolean doBlindCopy,
boolean async,
EmailOptionsIf options)
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 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 theSubject,
java.lang.String theContentText,
boolean doBlindCopy,
java.lang.String fullAttachmentFilename,
java.lang.String friendlyAttachmentName,
boolean deleteAttachmentAfterSend,
java.lang.String bccEmails,
boolean async)
Send a text-only email message to the specified recipient, with the specified subject, text
content and attachment options.
|
void |
sendText(java.lang.String toAddressString,
java.lang.String fromAddressString,
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 and from address, 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 and from address, with the
specified subject and text content.
|
void |
sendWelcomeEmail(int customerId,
java.lang.String subject,
java.lang.String countryCode)
Deprecated.
|
EmailIf |
sendWelcomeEmail1(int customerId,
EmailOptionsIf options)
A welcome email is sent after registration
|
protected void |
setInstalledExternalMailModule(EmailMgr.StaticData sd)
Determines whether an external email module is installed and sets it on the static data if it
is.
|
protected void |
validateEmailOptions(EmailOptionsIf options)
protected method used to validate the eMail options
|
acquireLock, addInsertAttr, addInsertAttr, addStringRuleConstraint, addStringRuleConstraint, checkRequired, escapeHTML, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, getAdminEngMgr, getBasketMgr, getBillingMgr, getBookableProductMgr, getCacheMgr, getCatMgr, getConfigMgr, getCookieMgr, getCurrMgr, getCustMgr, getCustomerIdFromSession, getCustomerStatsMgr, getCustomerTagMgr, getEmailMgr, getEng, getEventMgr, getExportMgr, getHTMLEscaper, getKonaKartConfig, getKonaKartConfig, getKonaKartConfig, getLangMgr, getManuMgr, getMiscItemMgr, getMiscPriceMgr, getMode, getModeString, getMqMgr, getMultiStoreMgr, getNewCriteria, getNewCriteria, getOrderIntegrationMgr, getOrderMgr, getOrderTotalMgr, getPaymentMgr, getProdMgr, getProductsToCategoresCriteria, getPromMgr, getPunchOutMgr, getRewardPointMgr, getSecMgr, getShippingMgr, getSolrMgr, getStoreId, getStoreMgr, getStoreTime, getSuggestionMgr, getTaxMgr, getTemplate, getTemplateRoot, getWishListMgr, init, insertKKEvent, insertKKEvent, isBusiness, isBusinessOrEnterprise, isClassPresent, isCommunity, isDeadlockException, isEnterprise, isMultiStoreShareCategories, isMultiStoreShareCustomers, isMultiStoreShareCustomersOrProducts, isMultiStoreSharedDb, isMultiStoreShareProducts, isMultiVendor, isUnix, manageThrowable, releaseLock, updateStaticVariablesNow
protected static org.apache.commons.logging.Log log
protected java.lang.String storeOwner
protected java.lang.String storeName
protected java.lang.String storeOwnerEmailAddr
protected boolean sendEmails
protected boolean debugEmail
protected boolean sendOrderConfEmails
protected boolean sendStockReordeEmails
protected boolean sendWelcomeEmails
protected boolean sendNewPasswordEmails
protected boolean displayPricesWithTax
protected java.lang.String logFileDirectory
protected java.lang.String pdfBase
protected java.lang.String imageBase
protected java.lang.String sysAdminEmailAddress
public static final java.lang.String NEW_PASSWORD_TEMPLATE
public static final java.lang.String WELCOME_TEMPLATE
public static final java.lang.String MANUAL_REGISTRATION_VERIFICATION
public static final java.lang.String REGISTRATION_CHECK
public static final java.lang.String ORDER_CONFIRMATION_TEMPLATE
public static final java.lang.String LOW_STOCK_ALERT_TEMPLATE
protected static java.util.Map<java.lang.String,EmailMgr.StaticData> staticDataHM
protected static java.lang.String emailMgrMutex
public EmailMgr(KKEngIf eng) throws java.lang.Exception
eng
- the engjava.lang.Exception
- an unexpected exceptionpublic void refreshConfigs() throws java.lang.Exception
refreshConfigs
in interface EmailMgrIf
java.lang.Exception
- an unexpected exceptionprotected void refreshPrivateConfigs() throws java.lang.Exception
java.lang.Exception
- an unexpected exceptionpublic void sendMail(int contentType, java.lang.String toAddressString, java.lang.String theSubject, java.lang.String theContent, boolean doBlindCopy, boolean async) throws com.konakart.app.KKException
contentType
- Content Type of the emailtoAddressString
- TO: addresstheSubject
- the subject linetheContent
- the body of the emaildoBlindCopy
- if true add the defined Blind Copy address, if false do not.async
- set to true to send the mail asynchronously or false to send it synchronouslycom.konakart.app.KKException
- an unexpected KKException exceptionpublic void sendMail(int contentType, java.lang.String toAddressString, java.lang.String theSubject, java.lang.String theContent, boolean doBlindCopy, boolean async, EmailOptionsIf options) throws com.konakart.app.KKException
contentType
- Content Type of the emailtoAddressString
- TO: addresstheSubject
- the subject linetheContent
- the body of the emaildoBlindCopy
- if true add the defined Blind Copy address, if false do not.async
- set to true to send the mail asynchronously or false to send it synchronouslyoptions
- Email Optionscom.konakart.app.KKException
- an unexpected KKException exceptionpublic void sendMail(int contentType, java.lang.String toAddressString, java.lang.String theSubject, java.lang.String theContent, boolean doBlindCopy, java.lang.String fullAttachmentFilename, java.lang.String friendlyAttachmentName, boolean deleteAttachmentAfterSend, boolean async) throws com.konakart.app.KKException
contentType
- Content Type of the emailtoAddressString
- TO: addresstheSubject
- the subject linetheContent
- the body of the emailfullAttachmentFilename
- full filename of the attachmentfriendlyAttachmentName
- friendly name to use for the attachmentdeleteAttachmentAfterSend
- set to true to delete the attachment file after the senddoBlindCopy
- if true add the defined Blind Copy address, if false do not.async
- set to true to send the mail asynchronously or false to send it synchronouslycom.konakart.app.KKException
- an unexpected KKException exceptionpublic void sendMail(java.lang.String toAddressString, java.lang.String theSubject, java.lang.String theContent, boolean doBlindCopy, boolean async, EmailOptionsIf options) throws com.konakart.app.KKException
toAddressString
- TO: addresstheSubject
- the subject linetheContent
- the body of the emaildoBlindCopy
- if true add the defined Blind Copy address, if false do not.async
- set to true to send the mail asynchronously or false to send it synchronouslyoptions
- Email Optionscom.konakart.app.KKException
- an unexpected KKException exceptionpublic void sendHTML(EmailOptionsIf options) throws com.konakart.app.KKException
sendHTML
in interface EmailMgrIf
options
- Email Optionscom.konakart.app.KKException
- an unexpected KKException exceptionpublic void sendHTML(java.lang.String toAddressString, java.lang.String theSubject, java.lang.String theContentHTML, boolean doBlindCopy, boolean async, EmailOptionsIf options) throws com.konakart.app.KKException
toAddressString
- TO: addresstheSubject
- the subject linetheContentHTML
- the HTML body of the emaildoBlindCopy
- if true add the defined Blind Copy address, if false do not.async
- set to true to send the mail asynchronously or false to send it synchronouslyoptions
- Email Optionscom.konakart.app.KKException
- an unexpected KKException exceptionpublic void sendHTML(java.lang.String toAddressString, java.lang.String theSubject, java.lang.String theContentHTML, boolean doBlindCopy, java.lang.String bccEmails, boolean async) throws com.konakart.app.KKException
sendHTML
in interface EmailMgrIf
toAddressString
- TO: addresstheSubject
- the subject linetheContentHTML
- the HTML body of the emaildoBlindCopy
- if true add the defined Blind Copy address, if false do not.bccEmails
- Semicolon separated list of blind copy email addresses.async
- set to true to send the mail asynchronously or false to send it synchronouslycom.konakart.app.KKException
- an unexpected KKException exceptionpublic void sendHTML(java.lang.String toAddressString, java.lang.String fromAddressString, java.lang.String theSubject, java.lang.String theContentHTML, boolean doBlindCopy, java.lang.String bccEmails, boolean async) throws com.konakart.app.KKException
sendHTML
in interface EmailMgrIf
toAddressString
- TO: addressfromAddressString
- From address - if null the store default is usedtheSubject
- the subject linetheContentHTML
- the HTML body of the emaildoBlindCopy
- if true add the defined Blind Copy address, if false do not.bccEmails
- Semicolon separated list of blind copy email addresses.async
- set to true to send the mail asynchronously or false to send it synchronouslycom.konakart.app.KKException
- an unexpected KKException exceptionpublic void sendHTML(java.lang.String toAddressString, java.lang.String fromAddressString, java.lang.String replyToAddressString, java.lang.String theSubject, java.lang.String theContentHTML, boolean doBlindCopy, java.lang.String bccEmails, boolean async) throws com.konakart.app.KKException
sendHTML
in interface EmailMgrIf
toAddressString
- TO: addressfromAddressString
- From address - if null the store default is usedreplyToAddressString
- Reply To address - if null the store default is usedtheSubject
- the subject linetheContentHTML
- the HTML body of the emaildoBlindCopy
- if true add the defined Blind Copy address, if false do not.bccEmails
- Semicolon separated list of blind copy email addresses.async
- set to true to send the mail asynchronously or false to send it synchronouslycom.konakart.app.KKException
- an unexpected KKException exceptionpublic void sendHTML(java.lang.String toAddressString, java.lang.String theSubject, java.lang.String theContentHTML, boolean doBlindCopy, java.lang.String fullAttachmentFilename, java.lang.String friendlyAttachmentName, boolean deleteAttachmentAfterSend, java.lang.String bccEmails, boolean async) throws com.konakart.app.KKException
toAddressString
- TO: addresstheSubject
- the subject linetheContentHTML
- the HTML body of the emaildoBlindCopy
- if true add the defined Blind Copy address, if false do not.fullAttachmentFilename
- full filename of the attachmentfriendlyAttachmentName
- friendly name to use for the attachmentdeleteAttachmentAfterSend
- set to true to delete the attachment file after the sendbccEmails
- Semicolon separated list of blind copy email addresses.async
- set to true to send the mail asynchronously or false to send it synchronouslycom.konakart.app.KKException
- an unexpected KKException exceptionpublic void sendText(EmailOptionsIf options) throws com.konakart.app.KKException
sendText
in interface EmailMgrIf
options
- Email Optionscom.konakart.app.KKException
- an unexpected KKException exceptionpublic void sendText(java.lang.String toAddressString, java.lang.String theSubject, java.lang.String theContentText, boolean doBlindCopy, boolean async, EmailOptionsIf options) throws com.konakart.app.KKException
toAddressString
- TO: addresstheSubject
- the subject linetheContentText
- the plain text body of the maildoBlindCopy
- if true add the defined Blind Copy address, if false do not.async
- set to true to send the mail asynchronously or false to send it synchronouslyoptions
- Email Optionscom.konakart.app.KKException
- an unexpected KKException exceptionpublic void sendText(java.lang.String toAddressString, java.lang.String theSubject, java.lang.String theContentText, boolean doBlindCopy, java.lang.String bccEmails, boolean async) throws com.konakart.app.KKException
sendText
in interface EmailMgrIf
toAddressString
- TO: addresstheSubject
- the subject linetheContentText
- the plain text body of the maildoBlindCopy
- if true add the defined Blind Copy address, if false do not.bccEmails
- Semicolon separated list of blind copy email addresses.async
- set to true to send the mail asynchronously or false to send it synchronouslycom.konakart.app.KKException
- an unexpected KKException exceptionpublic void sendText(java.lang.String toAddressString, java.lang.String fromAddressString, java.lang.String theSubject, java.lang.String theContentText, boolean doBlindCopy, java.lang.String bccEmails, boolean async) throws com.konakart.app.KKException
sendText
in interface EmailMgrIf
toAddressString
- TO: addressfromAddressString
- From address - if null the store default is usedtheSubject
- the subject linetheContentText
- the plain text body of the maildoBlindCopy
- if true add the defined Blind Copy address, if false do not.bccEmails
- Semicolon separated list of blind copy email addresses.async
- set to true to send the mail asynchronously or false to send it synchronouslycom.konakart.app.KKException
- an unexpected KKException exceptionpublic 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) throws com.konakart.app.KKException
sendText
in interface EmailMgrIf
toAddressString
- TO: addressfromAddressString
- From address - if null the store default is usedreplyToAddressString
- Reply To address - if null the store default is usedtheSubject
- the subject linetheContentText
- the plain text body of the mailbccEmails
- Semicolon separated list of blind copy email addresses.doBlindCopy
- if true add the defined Blind Copy address, if false do not.async
- set to true to send the mail asynchronously or false to send it synchronouslycom.konakart.app.KKException
- an unexpected KKException exceptionpublic void sendText(java.lang.String toAddressString, java.lang.String theSubject, java.lang.String theContentText, boolean doBlindCopy, java.lang.String fullAttachmentFilename, java.lang.String friendlyAttachmentName, boolean deleteAttachmentAfterSend, java.lang.String bccEmails, boolean async) throws com.konakart.app.KKException
toAddressString
- TO: addresstheSubject
- the subject linetheContentText
- the plain text body of the maildoBlindCopy
- if true add the defined Blind Copy address, if false do not.fullAttachmentFilename
- full filename of the attachmentfriendlyAttachmentName
- friendly name to use for the attachmentdeleteAttachmentAfterSend
- set to true to delete the attachment file after the sendbccEmails
- Semicolon separated list of blind copy email addresses.async
- set to true to send the mail asynchronously or false to send it synchronouslycom.konakart.app.KKException
- an unexpected KKException exceptionpublic boolean isEmailValid(java.lang.String emailAddr)
isEmailValid
in interface EmailMgrIf
emailAddr
- the emailAddrprotected org.apache.velocity.app.VelocityEngine getVelocityEngine() throws java.lang.Exception
java.lang.Exception
- an unexpected exceptionprotected org.apache.velocity.VelocityContext getVelocityContext(EmailOptionsIf options) throws java.lang.Exception
options
- the optionsjava.lang.Exception
- an unexpected exceptionprotected VelocityContextMgrIf getVelocityContextMgr() throws java.lang.Exception
getVelocityContextMgr
in class BaseMgr
java.lang.Exception
- an unexpected exception@Deprecated public void sendNewPasswordEmail(java.lang.String emailAddr, java.lang.String newPassword, java.lang.String subject, java.lang.String countryCode) throws java.lang.Exception
EmailMgrIf
sendNewPasswordEmail
in interface EmailMgrIf
emailAddr
- the emailAddrnewPassword
- the newPasswordsubject
- the email subject line. If null it is retrieved from the first line of the new
password template.countryCode
- the countryCodejava.lang.Exception
- an unexpected exceptionpublic EmailIf sendNewPasswordEmail1(java.lang.String emailAddr, java.lang.String newPassword, Customer cust, EmailOptionsIf options) throws java.lang.Exception
sendNewPasswordEmail1
in interface EmailMgrIf
emailAddr
- the emailAddrnewPassword
- the newPasswordcust
- the custoptions
- the optionsjava.lang.Exception
- an unexpected exceptionpublic void sendStockReorderEmail(java.lang.String emailAddr, java.lang.String productName, int productQuantity, int productId, java.lang.String sku) throws java.lang.Exception
sendStockReorderEmail
in interface EmailMgrIf
emailAddr
- the emailAddrproductName
- the productNameproductQuantity
- the productQuantityproductId
- the productIdsku
- the skujava.lang.Exception
- an unexpected exception@Deprecated public void sendWelcomeEmail(int customerId, java.lang.String subject, java.lang.String countryCode) throws java.lang.Exception
sendWelcomeEmail
in interface EmailMgrIf
customerId
- the customerIdsubject
- the email subject line. If null it is retrieved from the first line of the
template.countryCode
- the countryCodejava.lang.Exception
- an unexpected exceptionpublic EmailIf sendWelcomeEmail1(int customerId, EmailOptionsIf options) throws java.lang.Exception
sendWelcomeEmail1
in interface EmailMgrIf
customerId
- the customerIdoptions
- the optionsjava.lang.Exception
- an unexpected exception@Deprecated public void sendOrderConfirmationEmail(java.lang.String sessionId, int orderId, java.lang.String subject, int languageId) throws java.lang.Exception
sendOrderConfirmationEmail
in interface EmailMgrIf
sessionId
- the sessionIdorderId
- the orderIdsubject
- the email subject line. If null it is retrieved from the first line of the
template.languageId
- the languageIdjava.lang.Exception
- an unexpected exceptionpublic EmailIf sendOrderConfirmationEmail1(java.lang.String sessionId, int orderId, int langIdForOrder, EmailOptionsIf options) throws java.lang.Exception
sendOrderConfirmationEmail1
in interface EmailMgrIf
sessionId
- the sessionIdorderId
- the orderIdlangIdForOrder
- the langIdForOrderoptions
- the optionsjava.lang.Exception
- an unexpected exception@Deprecated public void sendTemplateEmailToCustomer(int customerId, java.lang.String templateName, java.lang.String message, java.lang.String countryCode) throws java.lang.Exception
sendTemplateEmailToCustomer
in interface EmailMgrIf
customerId
- the customerIdtemplateName
- the templateNamemessage
- the messagecountryCode
- the countryCodejava.lang.Exception
- an unexpected exceptionpublic EmailIf sendTemplateEmailTo(int customerId, java.lang.String message, EmailOptionsIf options) throws java.lang.Exception
sendTemplateEmailTo
in interface EmailMgrIf
customerId
- the customerIdmessage
- the messageoptions
- the optionsjava.lang.Exception
- an unexpected exceptionpublic EmailIf notifySysAdmin(java.lang.String message, EmailOptionsIf options) throws java.lang.Exception
notifySysAdmin
in interface EmailMgrIf
message
- 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 exceptionpublic Emailer getEmailer() throws com.konakart.app.KKException
EmailMgrIf
getEmailer
in interface EmailMgrIf
com.konakart.app.KKException
- an unexpected KKException exceptionpublic void saveEmailContents(java.lang.String toAddr, int contentType, java.lang.String templateName, boolean doBCC, java.lang.String subject, java.lang.String body, java.lang.String addTofileName)
toAddr
- the toAddrcontentType
- the contentTypetemplateName
- the templateNamedoBCC
- the doBCCsubject
- the subjectbody
- the bodyaddTofileName
- the addTofileNamepublic void saveEmailContents(java.lang.String toAddr, int contentType, java.lang.String templateName, boolean doBCC, java.lang.String subject, java.lang.String body, java.lang.String addTofileName, EmailOptionsIf options)
toAddr
- the toAddrcontentType
- the contentTypetemplateName
- the templateNamedoBCC
- the doBCCsubject
- the subjectbody
- the bodyaddTofileName
- the addTofileNameoptions
- the optionsprotected void validateEmailOptions(EmailOptionsIf options) throws com.konakart.app.KKException
options
- the optionscom.konakart.app.KKException
- an unexpected KKException exceptionprotected void putCustomAttrsInContext(org.apache.velocity.VelocityContext context, NameValueIf[] customAttrs)
context
- the contextcustomAttrs
- the customAttrspublic java.lang.String getFormattedCustomerName(Customer cust) throws java.lang.Exception
cust
- the custjava.lang.Exception
- an unexpected exceptionprotected boolean sendExternalMail(org.apache.velocity.VelocityContext context, java.lang.String konakartAPI, java.lang.String emailAddr, EmailTemplate emailTemplate, EmailOptionsIf options)
context
- the contextkonakartAPI
- the konakartAPIemailAddr
- the emailAddremailTemplate
- the emailTemplateoptions
- the optionsprotected boolean isExternalMailEnabled(EmailMgr.StaticData sd) throws com.konakart.app.KKException
sd
- the sdcom.konakart.app.KKException
- an unexpected KKException exceptionprotected void setInstalledExternalMailModule(EmailMgr.StaticData sd) throws java.lang.Exception
sd
- the sdjava.lang.Exception
- an unexpected exceptionCopyright © 2018 DS Data Systems UK Ltd.