Skip to content

馃寛馃馃 fix all the "how do I configure email / SMTP?" issues

Warren Gifford requested to merge sg/fix-the-email into main

Created by: slimsag

Problem

Lots of customers don't have SMTP email sending configured. First off, we don't even tell site admins that this is something they should do. I would bet many of them don't even know that a part of their Sourcegraph instance isn't configured!

Secondly, it's hard, like real hard, to configure. There are NO docs. Creating an SMTP account is a huge pain, too. We don't even really give people a way to test if it works once you do try to configure it (code monitors aside.)

Yet, many features of Sourcegraph depend CRITICALLY on the ability to send emails! Password resets, inviting other users to Sourcegraph / an org/team, code monitors is virtually useless without email sending!

Solution: fix everything

Prompting admins to configure SMTP

Site admins are now warned if email sending is not configured:

image

Test email sending? Now ridiculously easy

The API console now lets you test email sending with a dirt simple query:

image

You'll get a detailed response back indicating any issues (NO need to go digging through logs anymore to find out why it mmight not be working!):

image

Clear documentation for using Amazon SES, Google Workspace/GMail, and other SMTP providers

A new docs page has DETAILED information on configuring Sourcegraph to use Amazon SES, Google Workspace/GMail, and other SMTP providers - as well as how to test it all works:

https://user-images.githubusercontent.com/3173176/157564199-ff95429f-1f7f-4986-9607-14b0d3dd7aa8.png

The Site Configuration page in our docs, as well as the help text in-product, now notes to look at that new page:

image

Asks

@philipp-spiess can you update the user invites frontend to link to this new docs page? It'll be https://docs.sourcegraph.com/admin/config/email

@limitedmage are there places on the Code Monitoring side that Search would like to update to point to this page?

Test plan

Docs: sg start docsite && viewing the docs pages manually.

Email send testing API: followed docs instructions and saw expected behavior.

Admin warning: Manually tested by removing email.smtp and email.address from site config, seeing it appear on refresh, adding it and seeing it go away.

Merge request reports

Loading