|
|
@ -12,6 +12,7 @@ use lettre::{
|
|
|
|
Transport,
|
|
|
|
Transport,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
use std::str::FromStr;
|
|
|
|
use std::str::FromStr;
|
|
|
|
|
|
|
|
use uuid::Uuid;
|
|
|
|
|
|
|
|
|
|
|
|
pub fn send_email(
|
|
|
|
pub fn send_email(
|
|
|
|
subject: &str,
|
|
|
|
subject: &str,
|
|
|
@ -44,6 +45,7 @@ pub fn send_email(
|
|
|
|
Some(to_username.to_string()),
|
|
|
|
Some(to_username.to_string()),
|
|
|
|
Address::from_str(to_email).expect("email to address isn't valid"),
|
|
|
|
Address::from_str(to_email).expect("email to address isn't valid"),
|
|
|
|
))
|
|
|
|
))
|
|
|
|
|
|
|
|
.message_id(Some(format!("{}@{}", Uuid::new_v4(), settings.hostname)))
|
|
|
|
.subject(subject)
|
|
|
|
.subject(subject)
|
|
|
|
.multipart(
|
|
|
|
.multipart(
|
|
|
|
MultiPart::mixed().multipart(
|
|
|
|
MultiPart::mixed().multipart(
|
|
|
|