aboutsummaryrefslogtreecommitdiff
path: root/src/mail.rs
diff options
context:
space:
mode:
authorDaniel García <[email protected]>2020-07-14 18:00:09 +0200
committerDaniel García <[email protected]>2020-07-14 18:34:22 +0200
commit668d5c23dc084b778496b655e93196bdfe007953 (patch)
treea0ac086e1e42970a6931529193fe6905663e5a27 /src/mail.rs
parentfb6f96f5c3bbe2ab281738a1c9a30a690d9bef0b (diff)
downloadvaultwarden-668d5c23dc084b778496b655e93196bdfe007953.tar.gz
vaultwarden-668d5c23dc084b778496b655e93196bdfe007953.zip
Removed try_trait and some formatting, particularly around imports
Diffstat (limited to 'src/mail.rs')
-rw-r--r--src/mail.rs30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/mail.rs b/src/mail.rs
index 8a6257f2..a80b7ca5 100644
--- a/src/mail.rs
+++ b/src/mail.rs
@@ -1,21 +1,23 @@
-use std::env;
-use std::str::FromStr;
-
-use lettre::message::{header, Mailbox, Message, MultiPart, SinglePart};
-use lettre::transport::smtp::authentication::{Credentials, Mechanism as SmtpAuthMechanism};
-use lettre::transport::smtp::extension::ClientId;
-use lettre::{Address, SmtpTransport, Tls, TlsParameters, Transport};
+use std::{env, str::FromStr};
+use chrono::{DateTime, Local};
+use chrono_tz::Tz;
use native_tls::{Protocol, TlsConnector};
use percent_encoding::{percent_encode, NON_ALPHANUMERIC};
-use crate::api::EmptyResult;
-use crate::auth::{encode_jwt, generate_delete_claims, generate_invite_claims, generate_verify_email_claims};
-use crate::error::Error;
-use crate::CONFIG;
-
-use chrono::{DateTime, Local};
-use chrono_tz::Tz;
+use lettre::{
+ message::{header, Mailbox, Message, MultiPart, SinglePart},
+ transport::smtp::authentication::{Credentials, Mechanism as SmtpAuthMechanism},
+ transport::smtp::extension::ClientId,
+ Address, SmtpTransport, Tls, TlsParameters, Transport,
+};
+
+use crate::{
+ api::EmptyResult,
+ auth::{encode_jwt, generate_delete_claims, generate_invite_claims, generate_verify_email_claims},
+ error::Error,
+ CONFIG,
+};
fn mailer() -> SmtpTransport {
let host = CONFIG.smtp_host().unwrap();