From c453dcb8885c21f32c12a22a27da4dc8980dae67 Mon Sep 17 00:00:00 2001 From: Diptesh Choudhuri Date: Wed, 31 Jul 2024 19:42:37 +0530 Subject: [PATCH] ci: remove smtp port options --- Cargo.lock | 25 ++++++++++++++++++++++++ Cargo.toml | 2 +- apps/backend/Cargo.toml | 5 +---- apps/backend/src/notification.rs | 3 +-- docs/includes/backend-config-schema.yaml | 3 --- libs/config/src/lib.rs | 2 -- rust-toolchain.toml | 2 +- 7 files changed, 29 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 65da8a9cd3..5f7fdffad2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2480,6 +2480,17 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "hostname" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9c7c7c8ac16c798734b8a24560c1362120597c40d5e1459f09498f8f6c8f2ba" +dependencies = [ + "cfg-if", + "libc", + "windows", +] + [[package]] name = "html5ever" version = "0.27.0" @@ -2919,9 +2930,12 @@ dependencies = [ "email-encoding", "email_address", "fastrand", + "futures-util", + "hostname", "httpdate", "idna", "mime", + "native-tls", "nom", "percent-encoding", "quoted_printable", @@ -5302,6 +5316,7 @@ dependencies = [ "indexmap 2.2.6", "log", "memchr", + "native-tls", "once_cell", "paste", "percent-encoding", @@ -6433,6 +6448,16 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" +dependencies = [ + "windows-core", + "windows-targets 0.52.6", +] + [[package]] name = "windows-core" version = "0.52.0" diff --git a/Cargo.toml b/Cargo.toml index e4f8f828e4..4fafb6c1a6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,7 @@ sea-orm = { version = "=1.0.0-rc.5", features = [ "debug-print", "postgres-array", "macros", - "runtime-tokio-rustls", + "runtime-tokio-native-tls", "sqlx-postgres", "with-chrono", "with-json", diff --git a/apps/backend/Cargo.toml b/apps/backend/Cargo.toml index 401290a3ea..a853727ca2 100644 --- a/apps/backend/Cargo.toml +++ b/apps/backend/Cargo.toml @@ -44,10 +44,7 @@ isolang = { version = "=2.4.0", features = ["list_languages"] } itertools = "=0.13.0" jsonwebtoken = { version = "=9.3.0", default-features = false } kinded = "=0.3.0" -lettre = { version = "=0.11.7", features = [ - "smtp-transport", - "builder", -], default-features = false } +lettre = "=0.11.7" markdown = "=1.0.0-alpha.18" mime_guess = "=2.0.5" nanoid = { workspace = true } diff --git a/apps/backend/src/notification.rs b/apps/backend/src/notification.rs index 992cfc85a4..1210f2809c 100644 --- a/apps/backend/src/notification.rs +++ b/apps/backend/src/notification.rs @@ -163,9 +163,8 @@ impl NotificationPlatformSpecifics { config.server.smtp.password.to_owned(), ); - let mailer = SmtpTransport::starttls_relay(&config.server.smtp.server) + let mailer = SmtpTransport::relay(&config.server.smtp.server) .unwrap() - .port(config.server.smtp.port) .credentials(credentials) .build(); diff --git a/docs/includes/backend-config-schema.yaml b/docs/includes/backend-config-schema.yaml index d8ce4a928a..ffdff6f777 100644 --- a/docs/includes/backend-config-schema.yaml +++ b/docs/includes/backend-config-schema.yaml @@ -206,9 +206,6 @@ server: # @envvar SERVER_SMTP_PASSWORD password: "" - # @envvar SERVER_SMTP_PORT - port: 587 - # @envvar SERVER_SMTP_SERVER server: "" diff --git a/libs/config/src/lib.rs b/libs/config/src/lib.rs index 390e95f898..daa5fbeb62 100644 --- a/libs/config/src/lib.rs +++ b/libs/config/src/lib.rs @@ -338,8 +338,6 @@ pub struct SchedulerConfig { #[config(rename_all = "snake_case", env_prefix = "SERVER_SMTP_")] pub struct SmtpConfig { pub server: String, - #[setting(default = 587)] - pub port: u16, pub user: String, pub password: String, #[setting(default = "Ryot ")] diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 7a231182a9..b09cebf85b 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] profile = "default" -channel = "1.77.2" +channel = "1.80.0"