fix in smtp and split rs files

This commit is contained in:
Mateusz Gruszczyński
2026-07-27 22:56:56 +02:00
parent cc3b172e56
commit d6c1c52310
30 changed files with 4327 additions and 4387 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ use lettre::{
use rand_core::{OsRng, RngCore};
use serde::{Deserialize, Serialize};
use sha2::{Digest, Sha256};
use sqlx::{any::AnyRow, Row};
use sqlx::{Row, any::AnyRow};
use tracing::{debug, info, warn};
use crate::{
@@ -2113,7 +2113,7 @@ async fn send_message(smtp: &SmtpConfig, message: Message, label: &str) -> Resul
}
.port(smtp.port);
if !smtp.username.is_empty() {
if !smtp.username.trim().is_empty() && !smtp.password.is_empty() {
builder = builder.credentials(Credentials::new(
smtp.username.clone(),
smtp.password.clone(),