Rename SmtpTransportBuilder to SmtpClient
This commit is contained in:
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user