From 8888dbba0a3e7733fc6f31da9b7210722c7ccb42 Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Mon, 3 Jan 2022 18:09:26 +0900 Subject: [PATCH] Initialize SMTP client with port number --- src/mail.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mail.rs b/src/mail.rs index efb6172f..0eb5bd5e 100644 --- a/src/mail.rs +++ b/src/mail.rs @@ -51,13 +51,13 @@ mod mailer { extension::ClientId, ConnectionReuseParameters, SmtpClient, SmtpTransport, }; - use plume_models::CONFIG; + use plume_models::{SmtpNewWithAddr, CONFIG}; pub type Mailer = Option; pub fn init() -> Mailer { let config = CONFIG.mail.as_ref()?; - let mail = SmtpClient::new_simple(&config.server) + let mail = SmtpClient::new_with_addr((&config.server, config.port)) .unwrap() .hello_name(ClientId::Domain(config.helo_name.clone())) .credentials(Credentials::new(