Package com.avoka.fc.core.service.email
Class SmtpEmailService
- java.lang.Object
-
- com.avoka.fc.core.service.BaseService
-
- com.avoka.fc.core.service.CayenneService
-
- com.avoka.fc.core.service.email.AbstractEmailService
-
- com.avoka.fc.core.service.email.SmtpEmailService
-
- All Implemented Interfaces:
IEmailService
,IServiceDefinitionAware
- Direct Known Subclasses:
EmailService
public class SmtpEmailService extends AbstractEmailService
Provides an SMTP Email Service.- Since:
- 4.3.2
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SmtpEmailService.EmailFormat
Provide an Email Format instance for use in Velocity templates.-
Nested classes/interfaces inherited from class com.avoka.fc.core.service.email.AbstractEmailService
AbstractEmailService.TempForm, AbstractEmailService.TempSubmission, AbstractEmailService.TempSubmissionExtractData, AbstractEmailService.TempUser
-
-
Field Summary
Fields Modifier and Type Field Description static String
SERVICE_NAME
The SMTP Email Service definition name.-
Fields inherited from class com.avoka.fc.core.service.email.AbstractEmailService
EMAIL_INFO_EVENT_LOG_PATTEN, serviceDefinition
-
-
Constructor Summary
Constructors Constructor Description SmtpEmailService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EmailQueue
queueEmail(Portal portal, String from, String to, String subject, String body, String category)
Create an email on the email queueEmailQueue
queueEmail(Portal portal, String from, String to, String subject, String body, String category, Map<String,byte[]> attachmentMap)
Create an email on the email queuevoid
sendEmailMessage(String subject, String message, String fromAddress, String replyToAddress, String toAddress, String ccAddress, String bccAddress, Map<String,byte[]> attachmentMap, Submission submission)
Send an email message.-
Methods inherited from class com.avoka.fc.core.service.email.AbstractEmailService
getServiceDefinition, getTemplatedEmailMessageForPortal, getTemplatedEmailMessageForSubmission, getTemplatedEmailMessageForSubmission, queueAccountStatusNotification, queueEmail, queueEmail, queueEmail, queueEmail, queueFormReceiptEmail, queueFormReceiptEmail, queueNewAccountNotification, queueOrSendFormConfirmationReceiptMessage, queuePromotionNotificationMessage, queueSavedFormEmail, queueSavedFormEmail, queueShareFormEmail, queueSubmissionUpdateNotification, queueTemplatedMessageForPortal, renderDeploymentPropertyTemplate, sendDuplicatePaymentAlertEmailToClientAdmin, sendEmailVerification, sendEmailVerification, sendFormConfirmationMessage, sendFormReceiptMessage, sendFraudAlertEmailToClientAdmin, sendLostPasswordMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessageWithSubmissionAttachments, sendSavedFormEmail, sendSavedFormEmail, sendTaskNotification, sendTemplatedMessageForPortal, sendWelcomeUserMessage, sendWelcomeUserMessage, setServiceDefinition
-
Methods inherited from class com.avoka.fc.core.service.CayenneService
commitChanges, deleteObject, deleteObjects, findObject, getDataContext, getDataDomain, getObjectForPK, getObjectStore, newObject, performNamedQuery, performNamedQuery, performNamedQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performQuery, performQuery, refetchEntity, refetchObject, registerNewObject, rollbackChanges, toMap, toMap
-
Methods inherited from class com.avoka.fc.core.service.BaseService
getLogger
-
-
-
-
Field Detail
-
SERVICE_NAME
public static final String SERVICE_NAME
The SMTP Email Service definition name.- See Also:
- Constant Field Values
-
-
Method Detail
-
sendEmailMessage
public void sendEmailMessage(String subject, String message, String fromAddress, String replyToAddress, String toAddress, String ccAddress, String bccAddress, Map<String,byte[]> attachmentMap, Submission submission)
Send an email message.- Parameters:
subject
- email subjectmessage
- email message bodyfromAddress
- the from addressreplyToAddress
- the reply-to addresstoAddress
- email to addressccAddress
- email address to ccbccAddress
- email address to bccattachmentMap
- attachments mapsubmission
- the submission the email relates to (optional)
-
queueEmail
public EmailQueue queueEmail(Portal portal, String from, String to, String subject, String body, String category)
Create an email on the email queue Note that this method contains database transactions. This method is provided for backwards compatibility.- Parameters:
portal
- the portal objectfrom
- from addressto
- to addresssubject
- the email subjectbody
- the email bodycategory
- the category of the email queue- Returns:
- the resulting email queue entry
-
queueEmail
public EmailQueue queueEmail(Portal portal, String from, String to, String subject, String body, String category, Map<String,byte[]> attachmentMap)
Create an email on the email queue Note that this method contains database transactions. This method is provided for backwards compatibility.- Parameters:
portal
- the portal objectfrom
- from addressto
- to addresssubject
- the email subjectbody
- the email bodycategory
- the category of the email queueattachmentMap
- the map of attachments (optional)- Returns:
- the resulting email queue entry
- Since:
- 4.1.0
-
-