chapter icon indicating copy to clipboard operation
chapter copied to clipboard

SMTP discussion

Open ojeytonwilliams opened this issue 2 years ago • 4 comments

My two cents, I know fCC is "dogfooding" this, but we did have a long conversation about not adding on specific packages, and rather using secure SMTP for the eventual product.

It seems like a slippery slope, as I assume others will want all of the other packages and unless they can be dynamically enabled from the server, it may end up being a lot of bloat.

I'm not an expert on the JS stack, so feel free to share if/how supporting all the specific 3rd party service libraries would work vs using the SMTP protocol to relay through any mail service that uses SMTP (which I assume to be most / all).

Originally posted by @allella in https://github.com/freeCodeCamp/chapter/issues/1262#issuecomment-1189374362

ojeytonwilliams avatar Jul 19 '22 18:07 ojeytonwilliams

I didn't want this discussion getting buried in a merged PR.

For context on sendgrid https://github.com/freeCodeCamp/chapter/pull/1262 the main thing I was after was the ability to send emails from the staging site: https://chapter.freecodecamp.dev. Once I've deployed @naomi-lgbt's PR that should be possible and we can test in a production-like environment.

Once we've got a viable MVP, the focus needs to go back to supporting self-hosting. The key issues being email, authentication, hosting and deployment. All of these need to be cheap, configurable and easy to set up.

While the MVP will involve a lot of FCC specific implementations, having got everything live and working together once should help when we try to support self-hosting again.

ojeytonwilliams avatar Jul 19 '22 19:07 ojeytonwilliams

I understand if it's to get to MVP and testing, but just wanted to check since it differed from the earlier SMTP-only direction.

Node Mailer only lists two of the popular services and we figure picking services isn't the way to go when the SMTP protocol should allow for relaying through 3rd party services or self-hosted email services.

allella avatar Jul 19 '22 19:07 allella

Also, I should mention that sendmail is a supported transport for relaying emails from a locally hosted mail daemon on the web server. While that's nice as an option, it's also the most likely way someone without a lot of sendmail / Postfix knowledge can get themselves in a jam by sending emails without proper validation, like SPF / DKIM.

My guess is most organizations will already use a 3rd party service, or their org is large enough that they have an IT staff that can provide SMTP settings for relaying and validating outbound emails.

allella avatar Jul 19 '22 19:07 allella

Yes, the use of Sendgrid is primarily a quick fix so we can get things running on .dev.

naomi-lgbt avatar Jul 19 '22 19:07 naomi-lgbt