allow overriding smtp_password with the LEMMY_SMTP_PASSWORD env var
Closes #3151
The env vars need to be documented, this page seems like the best place. Would you also make a pull request there?
Sure, I've done that.
Needs a run of cargo +nightly fmt
Needs a run of
cargo +nightly fmt
Sorry about that, I tried to do it before but couldn't figure it out (the +nightly part didn't work).
Formatted now.
Formatting still not passing, try running cargo +nightly fmt --all
Seems like the CI is using some outdated code?
Looking at the cargo_fmt action, it says this:
+ cargo +nightly fmt -- --check
Diff in /woodpecker/src/github.com/LemmyNet/lemmy/crates/utils/src/email.rs at line 78:
};
// Set the creds if they exist
- let smtp_password = std::env::var("LEMMY_SMTP_PASSWORD").ok().or(email_config.smtp_password);
+ let smtp_password = std::env::var("LEMMY_SMTP_PASSWORD")
+ .ok()
+ .or(email_config.smtp_password);
However, the code is already in that format in the actual code as you can check.
Formatting locally (on a different machine) returns no changes.