contact-centre-email-server
Windows service that dequeues queued Contact Centre emails from the ContactCentre SQL database, renders them via the TC template engine, and sends them over SMTP.
Health score
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.
Facts
| Languages | csharp |
| Frameworks | log4net 2.0.8, Autofac 4.9.4, Newtonsoft.Json 12, HtmlAgilityPack |
| Runtimes | .NET Framework 4.6.2 |
| Tests / CI | none / CI in place |
| Last commit | 2024-02-28 |
| Owner | Owner unknown (mapping to be curated) |
| Domain | Contact centre and CRM (system generated; curate in repo-owners.json to override) |
| Product area | Shared platform |
| Hosted | On-prem Deployed to our own machines
|
| Releases | 1 release pipeline(s): \marketing\contact-centre\contact-centre-email-server |
| Integration | smtp, rest, wcf, sqlserver |
| Source | Open in Azure DevOps |
Risk flags
Each flag links to its glossary definition.
Dependencies in context
Entanglement
kernel Bound into the core by 3 mechanism(s).
- Pinning dependency: application-framework
- Speaks WCF (client)
- Shares core database sqlserver:ContactCentre
Detaches when its pinning dependencies are cut or multi-targeted (application-framework); and when its WCF surface gains a modern interface or its WCF calls move to one; and when the shared database group it belongs to gains an owned API or completes schema separation (sqlserver:ContactCentre).
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
Not applicableNot a deployed service (libraries, database definitions, desktop apps) or a retirement candidate not worth the investment. Retirement or consolidation candidate; do not invest in ZDD adoption.
SQL Server exit
Retire insteadThis repo is a retirement or consolidation candidate. Do not invest in a database migration; execute the retirement and the SQL Server dependency disappears with it.
Containerisation
Retire insteadThis repo is a retirement or consolidation candidate; containerising it would be investment in something we intend to switch off.
Recommended actions
Review contact-centre-email-server for retirement
Dormant (last commit 2024-02-28) yet still release-linked, and nothing depends on it. Confirm remaining use, then retire and disarm its pipeline.
Impact: Shrinks the estate before the expensive work begins
proposedAssessment notes
contact-centre-email-server
Purpose
A console/Windows service (ContactCentre.EmailServer) that polls a mail-item queue held in the ContactCentre SQL Server database, resolves email templates and recipient/web details from cached TC services, and sends the resulting messages via SMTP (System.Net.Mail, port 25). It also calls a marketing opt-in Subscription service URL and links to Pure360 marketing packages for campaign emails.
Tech stack
C# on .NET Framework 4.6.2, old-style csproj with packages.config. Autofac for DI, log4net for logging, HtmlAgilityPack for HTML handling, custom DNS/MX resolution code. Heavy use of internal TC NuGet packages: TC.ConnectionBroker (SQL/WCF), TC.Phenix.ApplicationFramework, TC.Phenix.Services.Client, TC.ContactCentre.ServiceClient, Tc.ContactCentre.TemplateEngine, TC.UserAccount.ServiceContract, TC.Pure360.MarketingService.Shared, TC.PublicWebsites.WebLibrary (including a checked-in WebLibrary2008.dll binary).
Deployment
Included as a prod application with 1 release. Build pipeline contact-centre-email-server CI (classic-style azure-pipelines.yml using VSBuild/VSTest on a Default self-hosted agent pool) and release pipeline \marketing\contact-centre\contact-centre-email-server. Deployed as a Windows service (Install.bat/Uninstall.bat plus deployment-scripts), with per-environment App.*.config transforms (dev, qa, preproduction, production).
Dependencies
Internal: connection strings and WCF/SQL brokering via tc-connectionbroker; shared framework from application-framework; error handling from tc-exceptions. Also consumes Phenix service client and Contact Centre service/template packages (built from other TC repos) and a marketing subscription/opt-in HTTP endpoint. External: SMTP relay; Pure360 marketing service shared contracts.
Data stores
sqlserver:ContactCentre — the mail queue is read via _sqlConnectionBroker.GetDatabaseConnectionString("ContactCentre") and direct SqlClient access.
Integration points
SQL Server polling for queued mail, SMTP send with custom DNS/MX lookup, HTTP calls to the alternate-email page and Marketing Optin subscription service, and WCF via TC.ConnectionBroker.Wcf/Phenix service clients.
Code health
No test project in the solution (CI runs VSTest but nothing to find); README is untouched boilerplate. Manual threading model (Thread/lock state machine). Last commit 2024-02-28, so effectively dormant.
Modernisation risks
.NET Framework 4.6.2 is past end of support (eol-runtime, legacy-framework). Windows-service deployment with bat-file installers, checked-in legacy DLLs (WebLibrary2008), packages.config, no tests, and hand-rolled DNS/SMTP logic all raise migration cost. A rewrite onto .NET 8 worker service with a managed mail provider is the natural path; priority high given it sends customer-facing email.