Add test case

This commit is contained in:
Tyler Ruckinger
2018-12-28 19:47:48 -05:00
parent c988b1760a
commit f64721702f

View File

@@ -0,0 +1,18 @@
extern crate lettre_email;
extern crate lettre;
use lettre_email::EmailBuilder;
use lettre::{EmailAddress, Envelope};
#[test]
fn build_with_envelope_test() {
let e = Envelope::new(
Some(EmailAddress::new("from@example.org".to_string()).unwrap()),
vec![EmailAddress::new("to@example.org".to_string()).unwrap()],
).unwrap();
let _email = EmailBuilder::new()
.envelope(e)
.subject("subject")
.text("message")
.build()
.unwrap();
}