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:
@@ -24,7 +24,7 @@ clap = { version = "~2.33", features = ["suggestions", "color"] }
|
||||
csv = { version = "~1.1" }
|
||||
dotenv = { version = "~0.15.0" }
|
||||
envy = { version = "~0.4" }
|
||||
lettre ={ version = "0.10.0-beta.1" }
|
||||
lettre ={ version = "0.10.0-rc.3" }
|
||||
lazy_static = { version = "~1.4.0" }
|
||||
log = { version = "~0.4.8" }
|
||||
maud = { version = "~0.22.1" }
|
||||
|
||||
@@ -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()),
|
||||
),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user