feat(labrinth): environment variables for more customizable SMTP #2886
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request adds two new environment variables,
SMTP_PORT
andSMTP_TLS
. SMTP refers the protocol used to send emails.SMTP_PORT
configures which port to connect to on the SMTP server. It defaults to the standard and old default,25
.SMTP_TLS
is a boolean that defines if TLS security should be required to connect to the server. This defaults to the old value,true
. Implementation wise I've copied the default values from thelettre
crate we are using if the setting is enabled. This is how it behaved before, as we did not specify a TLS setting. If it is set tofalse
it will instead useTls::None
.This will help setting up labrinth for local development. You can use a mock SMTP server such as smtp4dev without setting up certificates and such.