Skip to content

feat!: Integrate Amazon SES #316

Closed
ElenaStamenkovskaCC wants to merge 11 commits intomainfrom
feature/support-aws-ses
Closed

feat!: Integrate Amazon SES #316
ElenaStamenkovskaCC wants to merge 11 commits intomainfrom
feature/support-aws-ses

Conversation

@ElenaStamenkovskaCC
Copy link
Collaborator

@ElenaStamenkovskaCC ElenaStamenkovskaCC commented Mar 4, 2026

What Changed?

This MR introduces a decoupled email service architecture using the Dependency Injection (DI) pattern. It integrates Amazon SES (Simple Email Service) for simple and template-based email management.

  • IEmailService: Defined a new interface for email operations (Template Creation, Sending).
  • AmazonSesService: Provided a concrete implementation using the AWS SDK for .NET (AmazonSESClient).
  • Added support for retrieving SES credentials and source email from appsettings.json.

Why?

We wanted to avoid hardcoding email layouts in our services, so we've implemented Amazon SES. It lets us manage templates directly in AWS, keeping our C# code clean and focused only on the data

Closes #311

Type of Change

  • ✨ New feature (adds new functionality without breaking existing features)

How Did You Test This?

I verified these changes by performing an end-to-end test of the email flow using a verified identity in our AWS development environment. I monitored the AWS Console to ensure the templates were correctly registered and used the AWS CLI/Logs to confirm successful delivery.

What I tested:

  • Identity Verification: Confirmed VerifyEmailIdentityAsync triggers the verification process in the SES console.
  • Template Management: Verified CreateEmailTemplateAsync correctly registers new templates in the AWS SES Email templates section with the expected placeholders.
  • Standard Sending: Confirmed SendEmailAsync delivers raw HTML/Text emails to verified recipient addresses.
  • Templated Sending: Successfully sent a dynamic email via SendTemplatedEmailAsync.

How to test it:

If you're testing this locally, make sure your appsettings.json has a verified SourceEmail and that you are sending to an email address already verified in our SES Sandbox to avoid MessageRejected errors. Then, try to send some emails.

Review Checklist

  • My code follows the project's style and conventions
  • I've reviewed my own code for obvious issues
  • I've added comments where the code might be confusing
  • I've updated relevant documentation (if needed)
  • I've tested my changes and they work as expected

Screenshots / Additional Context

@ElenaStamenkovskaCC ElenaStamenkovskaCC changed the title feat: add email service interface and ses implementation feat: Integrated Amazon SES Mar 10, 2026
@ElenaStamenkovskaCC ElenaStamenkovskaCC marked this pull request as ready for review March 10, 2026 15:18
@ElenaStamenkovskaCC ElenaStamenkovskaCC changed the title feat: Integrated Amazon SES feat: Integrate Amazon SES Mar 10, 2026
@ElenaStamenkovskaCC ElenaStamenkovskaCC changed the title feat: Integrate Amazon SES feat!: Integrate Amazon SES Mar 10, 2026
fvanderflier pushed a commit that referenced this pull request Mar 11, 2026
* feat: add email service interface and ses implementation

* feat: add properties in appsettings

* feat: provide template name as a method parameter

* fix: remove handling exceptions in service

* feat: add fluent validation for aws account check

* feat: add unit tests

* feat: update nuget package version

* feat: use factory pattern for aws client

* feat: rename service

* fix: rename service in tests

---------

Co-authored-by: elenastamenkovska <elena.stamenkovska@halicea.com>
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.

Configure AWS SES

2 participants