Skip to content

Conversation

@dtretyakov
Copy link

@dtretyakov dtretyakov commented Dec 17, 2025

Implements issue #525 - Send confirmation emails to form respondents after submission.

Features:

  • Add database migration for confirmation email settings (enabled, subject, body)
  • Add confirmation email fields to Form entity
  • Implement email sending with placeholder replacement:
    • {formTitle}, {formDescription}, {data} placeholders
    • Field name placeholders (e.g. {name}, {email})
    • Automatic data overview if {data} not in template
  • Add UI in Settings sidebar to configure confirmation emails
  • Automatically detect email field from form submissions
  • Send email from form owner's email address

Technical changes:

  • Add sendConfirmationEmail() method to FormsService
  • Integrate email sending into notifyNewSubmission() flow
  • Add unit tests for confirmation email functionality
  • Update FormsService constructor with IMailer and AnswerMapper dependencies
  • Update documentation (DataStructure.md, CHANGELOG.en.md)

The feature requires at least one email-validated short text question in the form. Email sending failures are logged but don't break the submission process.

Screenshot 2025-12-19 105758

@Chartman123
Copy link
Collaborator

@dtretyakov thanks for you contribution :) Please have a look at the failing checks and fix them :)

@codecov
Copy link

codecov bot commented Dec 18, 2025

Codecov Report

❌ Patch coverage is 78.84615% with 22 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
lib/Migration/Version050202Date20251217203121.php 0.00% 20 Missing ⚠️
lib/Service/FormsService.php 97.50% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@dtretyakov dtretyakov force-pushed the main branch 3 times, most recently from 52d72a9 to 3f94699 Compare December 19, 2025 08:48
@dtretyakov
Copy link
Author

@Chartman123 done, it seems that approval is required to re-run remaining checks

@dtretyakov dtretyakov force-pushed the main branch 5 times, most recently from 9de4a5c to e61e929 Compare December 20, 2025 06:18
Implements issue nextcloud#525 - Send confirmation emails to form respondents after submission.

Features:
- Add database migration for confirmation email settings (enabled, subject, body)
- Add confirmation email fields to Form entity
- Implement email sending with placeholder replacement:
  - {formTitle}, {formDescription}, {data} placeholders
  - Field name placeholders (e.g. {name}, {email})
  - Automatic data overview if {data} not in template
- Add UI in Settings sidebar to configure confirmation emails
- Automatically detect email field from form submissions
- Send email from form owner's email address

Technical changes:
- Add sendConfirmationEmail() method to FormsService
- Integrate email sending into notifyNewSubmission() flow
- Add unit tests for confirmation email functionality
- Update FormsService constructor with IMailer and AnswerMapper dependencies
- Update documentation (DataStructure.md, CHANGELOG.en.md)

The feature requires at least one email-validated short text question in the form.
Email sending failures are logged but don't break the submission process.

Signed-off-by: Dmitry Tretyakov <dtretyakov@gmail.com>
@dtretyakov
Copy link
Author

@Chartman123 the tests are green.

I’m not sure who could help reviewing that to proceed further.

@Chartman123
Copy link
Collaborator

@dtretyakov I'll have a closer look in the next days :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants