Skip to content

feat(email): enhance email services with welcome and account deletion…#87

Merged
Benji918 merged 2 commits into
devfrom
feat/email-templates
May 30, 2026
Merged

feat(email): enhance email services with welcome and account deletion…#87
Benji918 merged 2 commits into
devfrom
feat/email-templates

Conversation

@DanielPopoola
Copy link
Copy Markdown
Collaborator

@DanielPopoola DanielPopoola commented May 30, 2026

Description

Integrates three new transactional email templates (welcome, reset password, account deletion) into the email service. Templates follow the existing Jinja2 pattern in app/templates/emails/ and are wired into the appropriate service layer trigger points.

Type of Change

  • feat — New feature

Related Issue

Closes #

Changes Made

  • Added app/templates/emails/welcome.html — sent after successful email verification
  • Added app/templates/emails/reset_password.html — replaces the previous minimal template
  • Added app/templates/emails/account_deletion.html — sent when account deletion is requested
  • Added app/templates/emails/assets/ — icons and background image referenced by templates
  • Added send_welcome_email() to app/services/email_service.py
  • Added send_account_deletion_email() to app/services/email_service.py
  • Wired send_welcome_email() into VerificationService.verify_email() after user is marked verified
  • Updated send_password_reset_email() to use the new richer template

Proof of Work

API Response / Screenshots
// POST /api/v1/auth/verify-email
// Status: 200 OK
// {
//   "success": true,
//   "message": "Email verified successfully",
//   "data": {
//     "id": "...",
//     "email": "user@example.com",
//     "next_step": "onboarding"
//   }
// }

Test Cases

  • test_send_welcome_email_renders_without_error
  • test_send_reset_password_email_renders_without_error
  • test_send_account_deletion_email_renders_without_error
Test output
# uv run pytest tests/test_email_service.py -v -s
tests/test_email_service.py::test_send_welcome_email_renders_without_error [transformers] PyTorch was not found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
2026-05-30T05:02:22 [INFO    ] [00000000000000000000000000000000-0000000000000000] app.services.email_service: [MOCK EMAIL] to=user@example.com subject=Welcome to MeetMind
PASSED
tests/test_email_service.py::test_send_reset_password_email_renders_without_error 2026-05-30T05:02:22 [INFO    ] [00000000000000000000000000000000-0000000000000000] app.services.email_service: [MOCK EMAIL] to=user@example.com subject=Reset your MeetMind password
PASSED
tests/test_email_service.py::test_send_account_deletion_email_renders_without_error 2026-05-30T05:02:22 [INFO    ] [00000000000000000000000000000000-0000000000000000] app.services.email_service: [MOCK EMAIL] to=user@example.com subject=Account deletion requested
PASSED

============================================================ 3 passed in 6.45s =============================================================

Checklist

  • My branch follows the naming convention (feat/email-templates)
  • My commits follow Conventional Commits
  • I have added meaningful tests that cover success and failure paths
  • All new and existing tests pass locally (uv run pytest)
  • I have included proof of work (JSON responses or screenshots)
  • I have updated documentation if needed
  • My code follows the project's style guidelines

… emails, update templates, and improve verification flow
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 30, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 18ea4c67-a349-4332-a37e-e1ce2305d45c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/email-templates

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Benji918
Benji918 previously approved these changes May 30, 2026
@Benji918 Benji918 merged commit 3d15c03 into dev May 30, 2026
6 checks passed
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