Class FormMailService
java.lang.Object
sk.iway.iwcm.components.multistep_form.rest.FormMailService
Prepares and sends notification emails for submitted multistep forms.
The service derives sender details from submitted fields, applies form mail settings, composes HTML or plain-text content, handles attachments, and supports immediate or delayed delivery.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsendMail(FormsEntity form, Map<String, String> formData, FormSettingsEntity formSettings, String recipients, String subject, SaveFormService.FormFiles formFiles, boolean attachFiles, String cssData, StringBuilder htmlData, jakarta.servlet.http.HttpServletRequest request) Sends a notification email for the given form submission.
-
Field Details
-
NAME_FIELD_KEY
- See Also:
-
EMAIL_FIELD_KEY
- See Also:
-
-
Constructor Details
-
FormMailService
public FormMailService()
-
-
Method Details
-
sendMail
public void sendMail(FormsEntity form, Map<String, String> formData, FormSettingsEntity formSettings, String recipients, String subject, SaveFormService.FormFiles formFiles, boolean attachFiles, String cssData, StringBuilder htmlData, jakarta.servlet.http.HttpServletRequest request) throws SaveFormExceptionSends a notification email for the given form submission.The method derives sender details from configured form fields, applies encoding and recipient settings, prepares HTML or plain-text content and attachments, and either sends immediately or schedules delayed delivery.
- Parameters:
form- form entity with metadata and serialized field dataformData- ordered, unencrypted values keyed by logical field IDs; text is HTML-escaped, WYSIWYG content is sanitized, and upload values contain saved filenamesformSettings- form settings entity containing configuration for email sendingrecipients- comma‑separated list of recipient emailssubject- email subjectformFiles- uploaded files container to optionally attachattachFiles- when true attaches uploaded files to the emailcssData- stylesheet markup whose relative paths are converted to absolute URLshtmlData- rendered form body HTML (will be transformed as needed)request- current HTTP request used for context and headers- Throws:
SaveFormException- when the submission is rejected for email reasons or the message cannot be sent or queued
-