mirror of https://github.com/LemmyNet/lemmy.git
parent
454d3987a5
commit
35d0aba9e6
|
@ -2004,6 +2004,7 @@ dependencies = [
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"tokio",
|
"tokio",
|
||||||
"url",
|
"url",
|
||||||
|
"uuid",
|
||||||
"webpage",
|
"webpage",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -40,3 +40,4 @@ smart-default = "0.6.0"
|
||||||
webpage = { version = "1.3.0", default-features = false, features = ["serde"] }
|
webpage = { version = "1.3.0", default-features = false, features = ["serde"] }
|
||||||
jsonwebtoken = "7.2.0"
|
jsonwebtoken = "7.2.0"
|
||||||
doku = "0.10.1"
|
doku = "0.10.1"
|
||||||
|
uuid = { version = "0.8.2", features = ["serde", "v4"] }
|
||||||
|
|
|
@ -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(
|
||||||
|
|
Loading…
Reference in New Issue