Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(labrinth): environment variables for more customizable SMTP #2886

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

Erb3
Copy link
Contributor

@Erb3 Erb3 commented Nov 3, 2024

This pull request adds two new environment variables, SMTP_PORT and SMTP_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 the lettre 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 to false it will instead use Tls::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.

Erb3 added 3 commits November 3, 2024 08:53
This will help setting up labrinth for local development. You can now use a mock SMTP server such as smtp4dev. The TLS options will stay the same as before if set to `true`, and disabled when `false`.

Depends on modrinth#2883
@Erb3 Erb3 changed the title Smtp dev setup Add environment variables for SMTP development setup Nov 3, 2024
@Erb3 Erb3 changed the title Add environment variables for SMTP development setup feat(labrinth): environment variables for more customizable SMTP Nov 3, 2024
@Erb3
Copy link
Contributor Author

Erb3 commented Nov 23, 2024

Prioritizing this over #2883, making that one a draft and removing dependency on it due to conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant