Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
};
// Set the creds if they exist
};
// Set the creds if they exist
- if let (Some(username), Some(password)) = (email_config.smtp_login, email_config.smtp_password) {
+ let smtp_password = std::env::var("LEMMY_SMTP_PASSWORD")
+ .ok()
+ .or(email_config.smtp_password);
+
+ if let (Some(username), Some(password)) = (email_config.smtp_login, smtp_password) {
builder = builder.credentials(Credentials::new(username, password));
}
builder = builder.credentials(Credentials::new(username, password));
}