extern crate emailmessage; use emailmessage::{header, Message, SinglePart}; fn main() { let m: Message> = Message::builder() .from("NoBody ".parse().unwrap()) .reply_to("Yuin ".parse().unwrap()) .to("Hei ".parse().unwrap()) .subject("Happy new year") .mime_body( SinglePart::builder() .header(header::ContentType( "text/plain; charset=utf8".parse().unwrap(), )).header(header::ContentTransferEncoding::QuotedPrintable) .body("Привет, мир!"), ); println!("{}", m); }