Skip to content

Emails: plain-text alternative and current year in the footer - #1153

Merged
idormenco merged 4 commits into
mainfrom
feature/email-plain-text
Nov 10, 2026
Merged

idormenco merged 4 commits into
mainfrom
feature/email-plain-text

Conversation

@idormenco

Copy link
Copy Markdown
Contributor

What

  • Plain-text alternative. Every email template (confirm email, reset password, both invitations, citizen report and its answer fragments) has a .txt version next to the .html, filled with the same values. Both are sent: multipart/alternative over SMTP, Body.Text over SES. Some clients (Mail.ru) show nothing for HTML-only mail.
  • Footer year. The footer said a fixed "© 2024"; it is now ~$year$~, filled with the current year (UTC), in all five templates.

Compatibility

  • EmailModel gains TextBody; IJobService.EnqueueSendEmail takes it.
  • ISendEmailJob adds a 4-argument SendAsync(to, subject, body, textBody) and keeps the 3-argument one, so jobs already in the Hangfire queue at deploy still run (HTML only).

Tests

  • Vote.Monitor.Core.UnitTests/EmailTests: every email has the current year and no leftover placeholders in both bodies; the invitation's text; the exact text of a citizen report with input, select and rating answers, notes and attachments.
  • Integration test stubs and expectations updated for the text body. Core (56), Hangfire (55) and the email-related integration tests pass.

- Every email template has a .txt version, filled with the same values and sent beside the HTML
  (multipart/alternative over SMTP, Body.Text over SES), so clients that show no HTML (Mail.ru) read it.
- The footer's year is ~$year$~, filled with the current year (was a fixed 2024).
- EnqueueSendEmail carries the text body; ISendEmailJob keeps its 3-argument SendAsync for jobs
  already queued.
@vercel

vercel Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
votemonitor Ready Ready Preview Nov 10, 2026 12:14pm UTC

Request Review

idormenco and others added 2 commits November 10, 2026 10:20
… documentation comment'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
… documentation comment'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…ath.Combine' may silently drop its earlier arguments'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@idormenco
idormenco merged commit 9626aa6 into main Nov 10, 2026
5 checks passed
@idormenco
idormenco deleted the feature/email-plain-text branch November 10, 2026 12:17

This branch was successfully deployed

1 active deployment
Preview — f64c7cc0 Deployed Nov 10, 2026 by vercel[bot]
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