Rename SmtpTransportBuilder to SmtpClient

This commit is contained in:
Alexis Mousset
2018-04-30 01:01:59 +02:00
parent 4a61357205
commit 917ecbc477
10 changed files with 65 additions and 82 deletions

View File

@@ -48,7 +48,7 @@ extern crate lettre;
extern crate lettre_email;
extern crate mime;
use lettre::{Transport, SmtpTransport};
use lettre::{Transport, SmtpClient};
use lettre_email::Email;
use std::path::Path;
@@ -65,8 +65,8 @@ fn main() {
.unwrap();
// Open a local connection on port 25
let mut mailer = SmtpTransport::builder_unencrypted_localhost().unwrap()
.build();
let mut mailer = SmtpClient::new_unencrypted_localhost().unwrap()
.transport();
// Send the email
let result = mailer.send(email.into());