|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.konakart.bl.BaseMgr
com.konakart.bl.EmailMgr
public class EmailMgr
Email Manager class.
Field Summary | |
---|---|
protected java.lang.String |
imageBase
|
protected static org.apache.commons.logging.Log |
log
the log |
protected java.lang.String |
logFileDirectory
|
static java.lang.String |
LOW_STOCK_ALERT_TEMPLATE
Name of template for sending the Low Stock Alert 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
|
protected boolean |
sendEmails
|
protected boolean |
sendNewPasswordEmails
|
protected boolean |
sendOrderConfEmails
|
protected boolean |
sendStockReordeEmails
|
protected boolean |
sendWelcomeEmails
|
protected java.lang.String |
storeName
|
protected java.lang.String |
storeOwner
|
protected java.lang.String |
storeOwnerEmailAddr
|
static java.lang.String |
WELCOME_TEMPLATE
Name of template for sending the Welcome eMail |
Fields inherited from class com.konakart.bl.BaseMgr |
---|
templateBaseDir |
Constructor Summary | |
---|---|
EmailMgr(KKEngIf eng)
Constructor |
Method Summary | |
---|---|
Emailer |
getEmailer()
Used to get a new Emailer object used to send the E mails |
protected VelocityContextMgrIf |
getVelocityContextMgr()
|
protected org.apache.velocity.app.VelocityEngine |
getVelocityEngine()
|
boolean |
isEmailValid(java.lang.String emailAddr)
Determines whether the eMail address is valid |
protected void |
putCommonDataInContext(org.apache.velocity.VelocityContext context,
java.lang.String countryCode)
Common data that is placed in the context |
protected void |
putCustomAttrsInContext(org.apache.velocity.VelocityContext context,
NameValueIf[] customAttrs)
protected method used to populate the Velocity context with custom attributes |
void |
refreshConfigs()
Setup variables needed to send the mail |
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 |
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,
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. |
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 mailSubject,
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 |
void |
sendTemplateEmailToCustomer(int customerId,
java.lang.String templateName,
java.lang.String message,
java.lang.String countryCode)
Deprecated. |
EmailIf |
sendTemplateEmailToCustomer1(int customerId,
java.lang.String message,
EmailOptionsIf options)
Used to send a template based email to a 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 |
sendWelcomeEmail(int customerId,
java.lang.String mailSubject,
java.lang.String countryCode)
Deprecated. |
EmailIf |
sendWelcomeEmail1(int customerId,
EmailOptionsIf options)
A welcome email is sent after registration |
protected void |
validateEmailOptions(EmailOptionsIf options)
protected method used to validate the eMail options |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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 sendOrderConfEmails
protected boolean sendStockReordeEmails
protected boolean sendWelcomeEmails
protected boolean sendNewPasswordEmails
protected java.lang.String logFileDirectory
protected java.lang.String pdfBase
protected java.lang.String imageBase
public static final java.lang.String NEW_PASSWORD_TEMPLATE
public static final java.lang.String WELCOME_TEMPLATE
public static final java.lang.String ORDER_CONFIRMATION_TEMPLATE
public static final java.lang.String LOW_STOCK_ALERT_TEMPLATE
Constructor Detail |
---|
public EmailMgr(KKEngIf eng) throws java.lang.Exception
eng
-
java.lang.Exception
Method Detail |
---|
public void refreshConfigs() throws java.lang.Exception
refreshConfigs
in interface EmailMgrIf
java.lang.Exception
public void sendHTML(java.lang.String toAddressString, java.lang.String theSubject, java.lang.String theContentHTML, boolean doBlindCopy, boolean async) throws 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.async
- set to true to send the mail asynchronously or false to send it synchronously
KKException
public 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, boolean async) throws 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 sendasync
- set to true to send the mail asynchronously or false to send it synchronously
KKException
public void sendText(java.lang.String toAddressString, java.lang.String theSubject, java.lang.String theContentText, boolean doBlindCopy, boolean async) throws 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.async
- set to true to send the mail asynchronously or false to send it synchronously
KKException
public boolean isEmailValid(java.lang.String emailAddr)
isEmailValid
in interface EmailMgrIf
emailAddr
-
protected org.apache.velocity.app.VelocityEngine getVelocityEngine() throws java.lang.Exception
java.lang.Exception
protected VelocityContextMgrIf getVelocityContextMgr() throws java.lang.Exception
getVelocityContextMgr
in class BaseMgr
java.lang.Exception
@Deprecated public void sendNewPasswordEmail(java.lang.String emailAddr, java.lang.String newPassword, java.lang.String mailSubject, java.lang.String countryCode) throws java.lang.Exception
EmailMgrIf
sendNewPasswordEmail
in interface EmailMgrIf
emailAddr
- newPassword
- mailSubject
- countryCode
-
java.lang.Exception
public EmailIf sendNewPasswordEmail1(java.lang.String emailAddr, java.lang.String newPassword, Customer cust, EmailOptionsIf options) throws java.lang.Exception
sendNewPasswordEmail1
in interface EmailMgrIf
emailAddr
- newPassword
- options
-
java.lang.Exception
public 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
- productName
- productQuantity
- productId
- sku
-
java.lang.Exception
@Deprecated public void sendWelcomeEmail(int customerId, java.lang.String mailSubject, java.lang.String countryCode) throws java.lang.Exception
sendWelcomeEmail
in interface EmailMgrIf
customerId
- mailSubject
- countryCode
-
java.lang.Exception
public EmailIf sendWelcomeEmail1(int customerId, EmailOptionsIf options) throws java.lang.Exception
sendWelcomeEmail1
in interface EmailMgrIf
customerId
- options
-
java.lang.Exception
@Deprecated public void sendOrderConfirmationEmail(java.lang.String sessionId, int orderId, java.lang.String mailSubject, int languageId) throws java.lang.Exception
sendOrderConfirmationEmail
in interface EmailMgrIf
sessionId
- orderId
- mailSubject
- languageId
-
java.lang.Exception
public EmailIf sendOrderConfirmationEmail1(java.lang.String sessionId, int orderId, int langIdForOrder, EmailOptionsIf options) throws java.lang.Exception
sendOrderConfirmationEmail1
in interface EmailMgrIf
sessionId
- orderId
- langIdForOrder
- options
-
java.lang.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
- templateName
- message
- countryCode
-
java.lang.Exception
public EmailIf sendTemplateEmailToCustomer1(int customerId, java.lang.String message, EmailOptionsIf options) throws java.lang.Exception
sendTemplateEmailToCustomer1
in interface EmailMgrIf
customerId
- message
- options
-
java.lang.Exception
public Emailer getEmailer() throws KKException
EmailMgrIf
getEmailer
in interface EmailMgrIf
KKException
protected void validateEmailOptions(EmailOptionsIf options) throws KKException
options
-
KKException
protected void putCustomAttrsInContext(org.apache.velocity.VelocityContext context, NameValueIf[] customAttrs)
context
- customAttrs
- protected void putCommonDataInContext(org.apache.velocity.VelocityContext context, java.lang.String countryCode) throws java.lang.Exception
context
- countryCode
-
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |