Platform Evolution
Assessment run-2026-07-27-1 · 213 of 213 repos assessed
Repos / tc-mail-sender

tc-mail-sender

.NET 8 MassTransit worker that consumes SendHtmlEmailCommand messages from Amazon SQS and dispatches HTML emails (with attachments) over internal SMTP via MailKit.

93 · greenlowlooseOn-premZDD: ready with guardrailsservice

Health score

93

0 to 100 across seven weighted factors; nothing is hidden. Green is 75 and above, amber 50 to 74, red below 50. How scoring works.


Runtime currency / 25
25
Runs on supported modern .NET
Legacy transport / 15
15
No legacy WCF or SOAP surface
Test posture / 15
8
Some tests, coverage is thin
Security hygiene / 15
15
No credentials found in source
Dangerous coupling / 15
15
No dangerous coupling detected
Activity / 10
10
Actively maintained
Deployment hygiene / 5
5
CI in place
Health over time
2026-07-24 (run-2026-07-24-1): 932026-07-27 (run-2026-07-27-1): 93
No change since 2026-07-24 (93 to 93).

Facts

Languagescsharp
FrameworksMassTransit 8, MailKit 4, FluentValidation 12, Generic Host
Runtimes.NET 8
Tests / CIsome / CI in place
Last commit2026-06-08
OwnerOwner unknown (mapping to be curated)
DomainCustomer communications (system generated; curate in repo-owners.json to override)
Product areaShared platform
HostedOn-prem Deployed to our own machines
  • Release "\cx\tc-mail-sender": QA: deployment-group phase (agents on our own machines)
  • Release "\cx\tc-mail-sender": Staging: deployment-group phase (agents on our own machines)
  • Release "\cx\tc-mail-sender": Production: deployment-group phase (agents on our own machines)
  • build "tc-mail-sender" (build-tc-mail-sender.yml): on-prem signal "onPremiseDeploy: true" (runs on our own Docker hosts)
Releases1 release pipeline(s): \cx\tc-mail-sender
Integrationmasstransit, sqs, smtp
SourceOpen in Azure DevOps

Risk flags

Each flag links to its glossary definition.

Dependencies in context

Laying out the graph…
greenamberreddata store (square, dashed link)Node size follows fan-in. Click any node to open it.

Entanglement

loose No binding mechanisms apply: this system needs no untangling work.

    Capability duplication

    Part of the Mail sending family (review): Separate SQS/S3 delivery path; fold into the notifications strategy

    Migration playbooks

    Generated from this repo's assessment data: what is feasible, what blocks it, and the steps in order. Ratings: green means actionable now, amber means sequence other work first, red means blocked, grey means not applicable.

    ZDD adoption

    Ready with guardrails

    Close: the deployment path exists, but specific checks are needed first, typically raising tests, auditing serialized data, or respecting a shared schema with expand and contract. Test coverage is thin; ZDD shifts the safety net onto automation.

    Dependencies and gotchas
    • 2 system(s) depend on this repo; during a rolling deploy they will talk to old and new versions at once, so responses must stay compatible
    • Serialized state or messages in flight (Redis or queues): new code must deserialize objects written by the previous version
    Steps
    1. Adopt the four-stage discipline from the ZDD engineering standard: pre-deployment compatibility, deployment, feature activation behind a flag, post-release cleanup.
    2. Raise automated test coverage first: ZDD trades the end-of-sprint manual gate for continuous automated confidence, so the tests are the entry ticket.
    3. Make every change dual-version safe: backwards-compatible APIs (new major version for breaking wire changes), expand and contract for any schema change, and consumers tolerant of unknown fields.
    4. Audit serialized data: anything in Redis, queues or shared caches must deserialize cleanly across adjacent versions.
    5. Wrap behaviour changes in feature flags so code deploys dark and release becomes a business decision, not a deployment event.
    6. Route deployments through the Workflow Engine's automated drain, deploy, health-check, return cycle (the path proven by the first automated production run in mid-2026).
    7. Verify with area-scoped regression rather than the whole-platform cycle, and watch error rates after rollout with automated rollback on alert.

    SQL Server exit

    Not applicable

    No SQL Server dependency is recorded for this repo. Nothing to migrate.

    Containerisation

    Ready to containerise

    Modern runtime, no hosted legacy transport: this service can follow the estate's proven container path (Dockerfile, shared pipeline template, ECS via Terraform).

    Steps
    1. Add a Dockerfile and make the app read all configuration from environment variables and the secrets manager, never from machine-local files.
    2. Log to stdout and expose a health check endpoint so ECS can supervise it.
    3. Adopt the shared ci.yml pipeline template with the container parameters (awsRegion, containerAfterBuild, ecsTerraformRepo), which is exactly how the estate's existing AWS services deploy.
    4. Define the service in the Terraform repo, deploy to a non-production environment, then shift traffic and disarm the deployment-group release pipeline.

    Recommended actions

    No specific actions for this repo. It either needs only normal maintenance, or its work is covered by an estate-level action. See the full programme.

    Assessment notes

    tc-mail-sender

    Purpose

    A headless mail-dispatch worker: publishes a TC.Mail.Sender.Contracts package containing SendHtmlEmailCommand, consumes those commands from Amazon SQS via MassTransit, validates recipients (including a Travel Counsellors domain validator), builds MIME messages with a fluent builder, and sends them through the internal SMTP relay (smtp.travelcounsellors.com:25 in production; a testqa relay otherwise).

    Tech stack

    C# on .NET 8 Generic Host (no web endpoint). MassTransit 8.5 with AmazonSQS and AmazonS3 transports, MailKit/MimeKit for SMTP, FluentValidation 12, TC.ConnectionBroker.Aws for credential/bucket resolution, Nerdbank GitVersioning, StyleCop-style rulesets and shared Directory.Build.props. Dockerfile plus docker-compose for local runs.

    Deployment

    Included as prod_application with 1 release: release pipeline \cx\tc-mail-sender from build tc-mail-sender. YAML pipeline (build-tc-mail-sender.yml) uses the shared templates on Linux agents with containerAfterBuild: true (image aws-tc-mail-sender pushed to TC Docker Hub) and onPremiseDeploy: true, packing the Contracts package (net6.0/net8.0) for producers.

    Dependencies

    Internal: TC.ConnectionBroker + TC.ConnectionBroker.Aws (tc-connectionbroker) for AWS credentials, and TC.MassTransit.AmazonSQS conventions (no mappable source repo). External: Amazon SQS (bus transport, eu-west-1), Amazon S3 (claim-check storage), the internal SMTP relay. Notably it borrows the CX_TcStreamsMasstransitAdapterUser IAM credentials with a TODO to get its own IAM user.

    Data stores

    No database. Uses the CX_MailClaimCheckS3 S3 bucket as a MassTransit message-data (claim check) repository for large bodies/attachments, with a 7-day TTL.

    Integration points

    MassTransit over Amazon SQS inbound; SMTP outbound. Producers integrate by referencing the Contracts NuGet package and publishing commands to the bus.

    Code health

    One xunit test project with ~33 tests covering the MIME builder, validators and consumer — reasonable for the small codebase. Actively maintained (last commit 2026-06-08), YAML CI, but the README is untouched boilerplate and SMTP host/ports are hardcoded per-environment appsettings.

    Modernisation risks

    Low — modern stack, containerised, tested. Residual items: shared IAM credentials with the streams adapter (flagged TODO in code), reliance on an unauthenticated internal SMTP relay on port 25, and duplication of concern with the estate's other mail services (mail-service, mailtemplate-service) worth rationalising.