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

🚀 Feature: Create an infrastructure for sending emails with different providers #162

Open
1 task done
nevo-david opened this issue Mar 19, 2024 · 4 comments
Open
1 task done

Comments

@nevo-david
Copy link
Contributor

🔖 Feature description

Currently, Resend is the default provider for sending emails, but it might not be the ultimate solution for everybody.
We need to implement an infrastructure to add different providers (same as we have in the login)

🎤 Why is this feature needed ?

✌️ How do you aim to achieve this?

  • Create an interface that contains one function - send emails
  • Create a ProviderFactory that decides what email provider to take based on the variable EMAIL_PROVIDER
  • Modify EmailService to take the right provider.

🔄️ Additional Information

No response

👀 Have you spent some time to check if this feature request has been raised before?

  • I checked and didn't find similar issue

Are you willing to submit PR?

None

@Deepankar20
Copy link

So the ProviderFactory chooses the email provider as random or on what basis ? Also is it really a good thing to have multiple email providers lined up i mean the cost and all?

@joset98
Copy link

joset98 commented May 1, 2024

So the ProviderFactory chooses the email provider as random or on what basis ? Also is it really a good thing to have multiple email providers lined up i mean the cost and all?

I think this sould be defined by default for now or maybe based on a environment var. What do you think @nevo-david

@nevo-david
Copy link
Contributor Author

Hi @Deepankar20, it's not random :)
You will have to specify the email provider you want to use in the env variables like @joset98 said

@Deepankar20
Copy link

Deepankar20 commented May 11, 2024

hey @nevo-david ! so i am thinking of adding sendGrid, postmark and mailerSender providers so let me know if more than these options are required. Also I have to figure out the way you are using resend to complemetely understand the implementation of this feature so it will take me some time finsh up.

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

No branches or pull requests

3 participants