Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve email service by spliting the providers into different classes #236

Merged
merged 3 commits into from
Feb 20, 2025

Conversation

luizfonseca
Copy link
Contributor

First, just wanted to say that I really like the project and the work you've done so far!

This PR is mostly a minor improvement on how we are capturing the email provider information -- main reason because i wanted to add https://resend.com/ but didn't want to make the if block larger than it is.

This PR:

  • Creates an abstract class that mailers can extend. Main reason to do it this way is to ensure consistent typings/returns and hide those details on each mailer that implements it
  • Creates a mailer class for each, that way we can isolate any future nuances and eventually add more providers (e.g. resend, in another PR) 👌🏽

Feel free to discard or take over the PR if you don't like the approach of classes, I'm not married to it.

@byn9826
Copy link
Member

byn9826 commented Feb 20, 2025

Thanks for your PR, looks great to me. Very solid improvement.

@byn9826 byn9826 merged commit 3dfdce7 into ValueMelody:main Feb 20, 2025
1 check passed
byn9826 pushed a commit that referenced this pull request Feb 25, 2025
Hello 👋🏽 

As mentioned on #236, this PR adds support to use https://resend.com as
one of the email providers.

Users will need to follow the required setup to enable it (e.g. adding
their domains to resend and so on)

Tested with `ENVIRONMENT = 'prod'`

This PR:

- Adds the `ResendMailer`
- Adds the current test coverage to resend as well
- Updated docs

<img width="736" alt="Screenshot 2025-02-23 at 00 23 53"
src="https://github.com/user-attachments/assets/8aeace83-774d-4a2b-a89c-617ab5e5fd7b"
/>
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