feat(builder): Improve Message representation

* Remove bytes dependency and rely directly on bytes vec
* Allow encoding non-utf-8 strings
* Use Vec<u8> instead of Display for email formatting
This commit is contained in:
Alexis Mousset
2020-04-26 19:04:52 +02:00
parent 4e500ded50
commit 7f22a98f2f
23 changed files with 268 additions and 509 deletions

View File

@@ -16,7 +16,7 @@ fn main() {
// Open a local connection on port 25
let mut mailer = SmtpClient::new_unencrypted_localhost().unwrap().transport();
// Send the email
let result = mailer.send(email);
let result = mailer.send(&email);
if result.is_ok() {
println!("Email sent");

View File

@@ -23,7 +23,7 @@ fn main() {
.transport();
// Send the email
let result = mailer.send(email);
let result = mailer.send(&email);
if result.is_ok() {
println!("Email sent");