Sends user confirmation email#55
Conversation
Allow dynamic properties in 'meta'
Added test for confirmation emails
| export async function sendNotifyEmail(formSubmissionMessage) { | ||
| export async function sendNotifyEmails(formSubmissionMessage) { | ||
| await sendInternalEmail(formSubmissionMessage) | ||
| await sendUserConfirmationEmail(formSubmissionMessage) |
There was a problem hiding this comment.
pity notify doesn't have an atomic batch operation
whitewaterdesign
left a comment
There was a problem hiding this comment.
couple of questions, but looks good.
| */ | ||
| export async function getFormMetadata(formId) { | ||
| // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition | ||
| if (!managerUrl) { |
There was a problem hiding this comment.
Why is this eslint-disable-next-line needed? Shouldn't config.get('managerUrl') be string | undefined?
There was a problem hiding this comment.
I copied from previous method. Unfortunately the types from config.get() aren't correct (for all config items) so coerced the assignment. Let me know if you're happy with that or if you want me to do something more drastic with the config.get stuff
There was a problem hiding this comment.
Thanks for sorting that Jez 🎉
| describe('user-confirmation', () => { | ||
| test('should handle general email content', () => { | ||
| const formName = 'My Form Name' | ||
| const submissionDate = new Date(2025, 10, 4, 14, 21, 35) // Novemeber date to prevent issues with BST during testing |
There was a problem hiding this comment.
I'd prefer the isostring approach and a test for both inside and outside BST
|



Ticket DF-330
Processes submission message and sends user confirmation (if target email is supplied) in addition to the existing internal submission email