airyhq / airy

💬 Open Source App Framework to build streaming apps with real-time data - 💎 Build real-time data pipelines and make real-time data universally accessible - 🤖 Join historical and real-time data in the stream to create smarter ML and AI applications. - ⚡ Standardize complex data ingestion and stream data to apps with pre-built connectors
https://airy.co/docs/core
Apache License 2.0
369 stars 44 forks source link

Email Source #1953

Open chrismatix opened 3 years ago

chrismatix commented 3 years ago

Motivation

Email is a critical part of any company's conversational stack, both for internal and customer-facing use cases. Since an email is nothing more than a message we can offer it as a messaging source in Airy.

As an airy user Given that I have a running Airy core installation When I configure email as source Then I can send and receive emails

steffh commented 3 years ago

I would strongly suggest to differentiate between support on protocol level (email) vs. supporting individual transactional email providers.

Due to the impending restrictions by Gmail et al to restrict outbound sending of emails per day, this seems to be unsuitable for group outbound emailing use cases such as customer support, but rather only individual account usage per sender.

Therefore we should start with implementing individual transactional email providers such as Mailgun, Sendgrid, Mandrill (Mailchimp) et al, that provide for the necessary scale to send and receive emails on scale in a team context. They also offer receiving emails via webhooks and sending emails via API requests or as the case may be SMTP credentials, and in that regard resemble the approach that we chose for text messages via providers such as Twilio, etc.

chrismatix commented 3 years ago

@steffh If we want to go that route, we need to decide which of the providers to implement first and change the ticket title accordingly.

steffh commented 3 years ago

Interesting implementation example by auth0:

Screenshot 2021-07-06 at 12 39 44

steffh commented 3 years ago

@chrismatix - the question would be how much the different providers differ from each other and how many we could implement at the same time?

Otherwise my order of importance would be: Mandrill, Sendgrid, Mailgun, Amazon SES, (SparkPost), SMTP

chrismatix commented 3 years ago

@steffh The send APIs for each of those providers differ and a quick look at the docs confirms that the same is true for the webhooks. Therefore we'd have to implement and deliver each provider as a separate source. So considering your priority list we should start by implementing Mandrill.

SMTP would not qualify as a full source since, as far as I understand, it's only used for sending emails.