Skip to content

send email after donation received#46

Merged
iulusoy merged 2 commits into
mainfrom
send-email-confirmation
Apr 29, 2026
Merged

send email after donation received#46
iulusoy merged 2 commits into
mainfrom
send-email-confirmation

Conversation

@iulusoy

@iulusoy iulusoy commented Apr 29, 2026

Copy link
Copy Markdown
Member
  • refactor email sending so donation re-uses same actions
  • type checking and improvement of donation form
  • rate limiting of requests
  • success / failure handling in the donation form

@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors email sending into a shared server utility and extends the donation flow to record a donation UUID and send a confirmation email, while adding request rate limiting and improved success/failure handling in the donation UI.

Changes:

  • Add donation UUID persistence + confirmation email sending with rollback behavior on send failure.
  • Refactor contact form email sending to reuse shared SMTP/email utilities.
  • Add Nginx rate limiting for POSTs to /contact and /donation, plus donation UI alert handling and new unit tests.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/nginx/conf/nginx.conf Adds POST-only rate limiting for contact/donation endpoints and centralizes proxy headers.
src/frontend/src/routes/donation/page.server.test.ts Adds unit tests covering donation action validation, DB insert, email send, and rollback paths.
src/frontend/src/routes/donation/+page.svelte Adds submission state + localized alert handling for donation success/failure and a honeypot field.
src/frontend/src/routes/donation/+page.server.ts Implements donation UUID generation, input validation, SMTP config validation, email confirmation, and rollback on send failure.
src/frontend/src/routes/contact/+page.server.ts Switches contact action to shared SMTP/email utilities and structured from handling.
src/frontend/src/lib/server/schema.ts Adds uuid column and unique index to donations table schema.
src/frontend/src/lib/server/email.ts Introduces shared SMTP config validation, email validation helpers, and transporter creation.
src/frontend/src/lib/i18n/translations.ts Adds donation alert translations and adds cross-locale structural type checks.
src/frontend/package.json Adds a smoke-test Playwright script entry.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/frontend/package.json
Comment thread src/frontend/src/lib/server/schema.ts
@iulusoy iulusoy merged commit 72a0e43 into main Apr 29, 2026
4 checks passed
@iulusoy iulusoy deleted the send-email-confirmation branch April 29, 2026 12:14
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