Skip to content

Conversation

@andrew8er
Copy link
Contributor

@andrew8er andrew8er commented Dec 16, 2025

Short Description

The regions applicationConfirmationMailNote is not included in the initial applicant mail. This is because our mailer DSL is very error prone. When not including the initial unary + method in the Paragraph builder block, the DSL will silently drop a text fragment. Additionally, there was an error in the Paragraph.plain() builder method.

Proposed Changes

  • Set sequence start values for tables with test data.
  • Add maildev service to the docker-compose file, for easier mail debugging.
  • Smaller code improvements.
  • Inline some methods from RegionRepository used in RegionMutationController, which where pointless. Also pull out code from transactions that does not need to execute in a transaction.
  • Add a t() method to the Paragraph builder class and use it instead of an unary + method.
  • Fix the error in Paragraph.plain().

Open questions

The text for the notification is mixed into the standard text we generate by default. The way regions seem to use this feature, creates really weird text flows with multiple salutations, a kind of mail in mail situation.

Testing

  • Log in as a region admin in the admin UI: http://localhost:3000/ and set a note in "/Region verwalten/Eingangsbestätigung Antrag". Also check the "Notiz aktivieren" button.
  • Go to http://localhost:3000/beantragen and create an application for that region.
  • Verify the mail that was created.

Resolved Issues

Fixes: #2743

@andrew8er andrew8er force-pushed the 2743-note-is-not-included-in-confirmation-of-receipt branch from b9689d3 to c8871a0 Compare December 16, 2025 14:14
@f1sh1918
Copy link
Contributor

f1sh1918 commented Jan 5, 2026

Just a general question to mailDev.
The service is running and i checked the configuration and afaics i have to use maildev@localhost.local in the application form to receive mails there.
Unfortunately i get an error that a mail can not be send to this mail address when submitting the application form.
Did you test this?
These two errors i get in the backend

Caused by: jakarta.mail.SendFailedException: Invalid Addresses
Caused by: org.eclipse.angus.mail.smtp.SMTPAddressFailedException: 550-Requested action not taken: mailbox unavailable

Copy link
Contributor

@f1sh1918 f1sh1918 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The related issue is fixed! 👍 Good work
Maybe some additional testing instructions would be good

I think its important to check that a multiline note with line breaks work, because just a single sentence did work before afaics. Just to ensure testers will test this issue properly.

Comment on lines +56 to 59
RegionsRepository.findRegionById(regionId).apply {
this.activatedForApplication = activatedForApplication
activatedForCardConfirmationMail = activatedForConfirmationMail
}
Copy link
Contributor

@seluianova seluianova Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
RegionsRepository.findRegionById(regionId).apply {
this.activatedForApplication = activatedForApplication
activatedForCardConfirmationMail = activatedForConfirmationMail
}
Regions.update({ Regions.id eq regionId }) {
it[this.activatedForApplication] = activatedForApplication
it[activatedForCardConfirmationMail] = activatedForConfirmationMail
}

🙃 can be changed to 1 query instead of 2
but it would be nice to check the return value in this case (updated == 1) to make sure the region was found

@seluianova
Copy link
Contributor

Unfortunately i get an error that a mail can not be send to this mail address when submitting the application form.

@f1sh1918 I think the maildev@localhost.local should be used in the project config:

    smtp:
      host: localhost
      port: 5025
      username: maildev@localhost.local
      password: maildev

Copy link
Contributor

@seluianova seluianova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@f1sh1918
Copy link
Contributor

f1sh1918 commented Jan 7, 2026

Unfortunately i get an error that a mail can not be send to this mail address when submitting the application form.

@f1sh1918 I think the maildev@localhost.local should be used in the project config:

    smtp:
      host: localhost
      port: 5025
      username: maildev@localhost.local
      password: maildev

Okay then I don't understand the docker config since there is the incoming user mapped.
For me it looks like the current config only provides a local mailbox

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.

Note is not included in confirmation of receipt

4 participants