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" }
|
csv = { version = "~1.1" }
|
||||||
dotenv = { version = "~0.15.0" }
|
dotenv = { version = "~0.15.0" }
|
||||||
envy = { version = "~0.4" }
|
envy = { version = "~0.4" }
|
||||||
lettre ={ version = "0.10.0-beta.1" }
|
lettre ={ version = "0.10.0-rc.3" }
|
||||||
lazy_static = { version = "~1.4.0" }
|
lazy_static = { version = "~1.4.0" }
|
||||||
log = { version = "~0.4.8" }
|
log = { version = "~0.4.8" }
|
||||||
maud = { version = "~0.22.1" }
|
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.
|
MultiPart::alternative() // This is composed of two parts.
|
||||||
.singlepart(
|
.singlepart(
|
||||||
SinglePart::builder()
|
SinglePart::builder()
|
||||||
.header(header::ContentType(
|
.header(header::ContentType::TEXT_PLAIN)
|
||||||
"text/plain; charset=utf8".parse().unwrap(),
|
|
||||||
))
|
|
||||||
.body(String::from(ascii_body)),
|
.body(String::from(ascii_body)),
|
||||||
)
|
)
|
||||||
.singlepart(
|
.singlepart(
|
||||||
SinglePart::builder()
|
SinglePart::builder()
|
||||||
.header(header::ContentType(
|
.header(header::ContentType::TEXT_PLAIN)
|
||||||
"text/html; charset=utf8".parse().unwrap(),
|
|
||||||
))
|
|
||||||
.body(html.into_string()),
|
.body(html.into_string()),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user