Skip to content

Commit

Permalink
message: more body improvements (lettre#519)
Browse files Browse the repository at this point in the history
  • Loading branch information
paolobarbolini authored Dec 18, 2020
1 parent f06b8f3 commit ad96998
Show file tree
Hide file tree
Showing 21 changed files with 422 additions and 249 deletions.
4 changes: 2 additions & 2 deletions benches/transport_smtp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fn bench_simple_send(c: &mut Criterion) {
.reply_to("Yuin <[email protected]>".parse().unwrap())
.to("Hei <[email protected]>".parse().unwrap())
.subject("Happy new year")
.body("Be happy!")
.body(String::from("Be happy!"))
.unwrap();
let result = black_box(sender.send(&email));
assert!(result.is_ok());
Expand All @@ -32,7 +32,7 @@ fn bench_reuse_send(c: &mut Criterion) {
.reply_to("Yuin <[email protected]>".parse().unwrap())
.to("Hei <[email protected]>".parse().unwrap())
.subject("Happy new year")
.body("Be happy!")
.body(String::from("Be happy!"))
.unwrap();
let result = black_box(sender.send(&email));
assert!(result.is_ok());
Expand Down
2 changes: 1 addition & 1 deletion examples/smtp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fn main() {
.reply_to("Yuin <[email protected]>".parse().unwrap())
.to("Hei <[email protected]>".parse().unwrap())
.subject("Happy new year")
.body("Be happy!")
.body(String::from("Be happy!"))
.unwrap();

// Open a local connection on port 25
Expand Down
2 changes: 1 addition & 1 deletion examples/smtp_selfsigned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fn main() {
.reply_to("Yuin <[email protected]>".parse().unwrap())
.to("Hei <[email protected]>".parse().unwrap())
.subject("Happy new year")
.body("Be happy!")
.body(String::from("Be happy!"))
.unwrap();

// Use a custom certificate stored on disk to securely verify the server's certificate
Expand Down
2 changes: 1 addition & 1 deletion examples/smtp_starttls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fn main() {
.reply_to("Yuin <[email protected]>".parse().unwrap())
.to("Hei <[email protected]>".parse().unwrap())
.subject("Happy new year")
.body("Be happy!")
.body(String::from("Be happy!"))
.unwrap();

let creds = Credentials::new("smtp_username".to_string(), "smtp_password".to_string());
Expand Down
2 changes: 1 addition & 1 deletion examples/smtp_tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fn main() {
.reply_to("Yuin <[email protected]>".parse().unwrap())
.to("Hei <[email protected]>".parse().unwrap())
.subject("Happy new year")
.body("Be happy!")
.body(String::from("Be happy!"))
.unwrap();

let creds = Credentials::new("smtp_username".to_string(), "smtp_password".to_string());
Expand Down
2 changes: 1 addition & 1 deletion examples/tokio02_smtp_starttls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async fn main() {
.reply_to("Yuin <[email protected]>".parse().unwrap())
.to("Hei <[email protected]>".parse().unwrap())
.subject("Happy new async year")
.body("Be happy with async!")
.body(String::from("Be happy with async!"))
.unwrap();

let creds = Credentials::new("smtp_username".to_string(), "smtp_password".to_string());
Expand Down
2 changes: 1 addition & 1 deletion examples/tokio02_smtp_tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async fn main() {
.reply_to("Yuin <[email protected]>".parse().unwrap())
.to("Hei <[email protected]>".parse().unwrap())
.subject("Happy new async year")
.body("Be happy with async!")
.body(String::from("Be happy with async!"))
.unwrap();

let creds = Credentials::new("smtp_username".to_string(), "smtp_password".to_string());
Expand Down
2 changes: 1 addition & 1 deletion examples/tokio03_smtp_starttls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async fn main() {
.reply_to("Yuin <[email protected]>".parse().unwrap())
.to("Hei <[email protected]>".parse().unwrap())
.subject("Happy new async year")
.body("Be happy with async!")
.body(String::from("Be happy with async!"))
.unwrap();

let creds = Credentials::new("smtp_username".to_string(), "smtp_password".to_string());
Expand Down
2 changes: 1 addition & 1 deletion examples/tokio03_smtp_tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async fn main() {
.reply_to("Yuin <[email protected]>".parse().unwrap())
.to("Hei <[email protected]>".parse().unwrap())
.subject("Happy new async year")
.body("Be happy with async!")
.body(String::from("Be happy with async!"))
.unwrap();

let creds = Credentials::new("smtp_username".to_string(), "smtp_password".to_string());
Expand Down
Loading

0 comments on commit ad96998

Please sign in to comment.