send_ticketdata: update lettre usage

* update Cargo.toml to new lettre crate (v0.10.0-rc.3)
* use TEXT_PLAIN method

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
2021-06-11 12:56:51 +02:00
parent e06545aa92
commit 5a21958325
2 changed files with 3 additions and 7 deletions

View File

@@ -76,16 +76,12 @@ pub fn sendticketdata(email: &Email, lang: &Lang) -> Result<(), Box<dyn Error>>
MultiPart::alternative() // This is composed of two parts.
.singlepart(
SinglePart::builder()
.header(header::ContentType(
"text/plain; charset=utf8".parse().unwrap(),
))
.header(header::ContentType::TEXT_PLAIN)
.body(String::from(ascii_body)),
)
.singlepart(
SinglePart::builder()
.header(header::ContentType(
"text/html; charset=utf8".parse().unwrap(),
))
.header(header::ContentType::TEXT_PLAIN)
.body(html.into_string()),
),
)