gitroomhq / postiz-app

📨 Schedule social media posts, measure them, exchange with other members and get a lot of help from AI 🚀
https://postiz.com
Apache License 2.0
9.98k stars 2.23k forks source link

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

Open nevo-david opened 8 months ago

nevo-david commented 8 months ago

🔖 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?

🔄️ Additional Information

No response

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

Are you willing to submit PR?

None

Deepankar20 commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

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.

DerLeole commented 2 months ago

I believe one of the most useful first additions would be a universal SMTP sender, which most providers support some way.

nevo-david commented 2 months ago

There is one pull request here, but it's a bit old, I will check it and merge it @DerLeole https://github.com/gitroomhq/postiz-app/pull/172/files

DerLeole commented 2 months ago

@nevo-david Awesome, thank you! It looks like that doesn't implement an SMTP provider yet, but I can use the structure setup in the PR to quickly develop my own and create a seperate PR for that.