Skip to content

feat: Add confirmation email for form respondents#3289

Open
dtretyakov wants to merge 1 commit intonextcloud:mainfrom
dtretyakov:feat/confirmation-email
Open

feat: Add confirmation email for form respondents#3289
dtretyakov wants to merge 1 commit intonextcloud:mainfrom
dtretyakov:feat/confirmation-email

Conversation

@dtretyakov
Copy link
Copy Markdown

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

Features:

  • Add confirmation email settings (enabled, subject, body) to Form entity.
  • Implement email sending with placeholder replacement:
    • {formTitle}, {formDescription}
    • Field placeholders based on name or label (e.g. {name}, {email}).
  • Allow form creators to explicitly select the recipient email field when multiple email fields are present.
  • Add UI in Settings sidebar to configure confirmation emails and recipient selection.
  • Replace basic email validation with Nextcloud's internal IEmailValidator.
  • Integration with activity notifications and background jobs for file syncing.

Technical changes:

  • Database migration for new Form properties.
  • Enhanced FormsService with email sending logic and validation.
  • Extensive unit and integration tests covering the new functionality.
  • Updated API documentation and OpenAPI spec.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 14, 2026

Codecov Report

❌ Patch coverage is 73.98374% with 32 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
lib/Migration/Version050301Date20260413233000.php 0.00% 25 Missing ⚠️
lib/Service/FormsService.php 92.39% 7 Missing ⚠️

📢 Thoughts on this report? Let us know!

@dtretyakov dtretyakov marked this pull request as ready for review April 14, 2026 07:10
@dtretyakov
Copy link
Copy Markdown
Author

@Chartman123 I also tried to streamline UX for the feature.

Now the form looks like that:

Снимок экрана 2026-04-14 в 09 04 36

@Chartman123
Copy link
Copy Markdown
Collaborator

@dtretyakov looks good :)

I'll ping the design specialists to see what they think about it :)

Signed-off-by: Dmitry Tretyakov <dtretyakov@gmail.com>
@dtretyakov dtretyakov force-pushed the feat/confirmation-email branch from b111145 to 9452b76 Compare April 14, 2026 07:28
@dtretyakov
Copy link
Copy Markdown
Author

OCP\Mail\IEmailValidator breaks backward compatibility for this PR. The interface is not available in nextcloud/ocp on stable31.

For app code here, IMailer::validateMailAddress() is the safer choice: it is already available across the supported server branches and covers the same validation use case without introducing a branch-specific compatibility break.

@Chartman123
Copy link
Copy Markdown
Collaborator

No problem, just ignore this. For the next release we will no longer support NC31

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