ZRU62WXDVY32ZF7AUYONXUQUAKZZGCUFWAYYBA32OXEBARVDVSNAC
NLEIFOAGRNGFH24MAEDEYVKNRSHZCWMHAI232E57QDSOBGLCHO4QC
I6SOPEQFWSSOZL7SWTQQK7OXEYZX62WVCLAMCKHFWGBA3OYALSJAC
WLWTNO4YJ4VBMJYVTP2LGPFQAJTOB524BD5INJFA44X2FKAX76DQC
HZDCKIXQ3LCD7YPL7ZZBCRMD7YMKDJ2QAALETTG3FYMBF4TNFUBAC
CMA5SKJ32PZJNZ2HUMESFZRXN4OYEHXDG2YONGED2336DBUY764AC
WVHXYKCVPKAFVMXBEMD3IHG54RKOIDSOCVNR3OIPEZQG36IGYJZQC
EVP2FSBHQUCAXQ6IIMBD6IS24ODKHP6HFWYCHIMYG6KOFRQG3RVQC
4MZ4VIR7FU3PQ3WKJI6TJIKYOIIBODFEPKLMQ32S4AKPZSDFO6AQC
Z3SYSC25TVJBLI4JBYM3OCBK7DYCC2BKPAYW6OVTN2ILFQ4ANUMQC
BCXEUKX6RVE4UQE46ITSQY2NXYK3MJT7HHL7CJOM7T4OOOCADMIAC
IM5ZPD4NEWQ67NSRP3M4R6FBET5HLY5YCX6WOTGGVWIMRGFD3L3AC
async fn send_email(
mailer: &lettre::AsyncSmtpTransport<lettre::Tokio1Executor>,
mailer_from: &lettre::message::Mailbox,
token_url: String,
to: &str,
) -> Result<(), Box<dyn std::error::Error>> {
let email = lettre::Message::builder()
.from(mailer_from.clone())
.to(to.parse()?)
.subject("FreeOrion reset game password link")
.body(format!(
"You requested change for FreeOrion game password.\n\
Use next link {} to enter new password. Link is active for 24 hours.\n\
Don't send it to other people.",
token_url
))?;
use lettre::AsyncTransport;
mailer.send(email).await?;
Ok(())
}