Repository: lettre/lettre (language: rust)

Issue:
StubEmailTransport does not log as stated in docs
When going through the stub transport example [on the docs page](https://docs.rs/lettre/0.6.2/lettre/#stub-transport), I'm having trouble getting something like the line `b7c211bc-9811-45ce-8cd9-68eab575d695: from=<user@localhost> to=<root@localhost>` to log as stated. I think my code is almost exactly as is written in the example:

```
extern crate lettre;
use lettre::transport::stub::StubEmailTransport;
use lettre::email::EmailBuilder;
use lettre::transport::EmailTransport;

fn main() {
    println!("Hello, world!");

    let email = EmailBuilder::new()
        .to("person@person.person")
        .from("sender@sender.sender")
        .subject("hello friend")
        .body("Greetings")
        .build()
        .unwrap();

    let mut sender = StubEmailTransport;
    let result = sender.send(email);
    assert!(result.is_ok());
}
```

I printed out the email struct, the email seems to be built without error. All fields that I passed in are present. I tried running `RUST_LOG=lettre cargo run` in addition to `cargo run`, however don't see any output other than the first print statement of 'Hello, world!'. I'm not sure how else to test if there is something else going wrong in the code, or if the code is working and the line simply isn't printing. 

Is there something I'm missing here, or is this a bug?


Discussion / hints:
You need to add the `env_logger` (https://docs.rs/env_logger/*/env_logger/) to your code to get logs, it is missing the example.

Fix patch:
diff --git a/lettre/examples/smtp.rs b/lettre/examples/smtp.rs
index 177e738ef..67b461928 100644
--- a/lettre/examples/smtp.rs
+++ b/lettre/examples/smtp.rs
@@ -1,8 +1,11 @@
 extern crate lettre;
+extern crate env_logger;
 
 use lettre::{EmailAddress, EmailTransport, SimpleSendableEmail, SmtpTransport};
 
 fn main() {
+    env_logger::init().unwrap();
+
     let email = SimpleSendableEmail::new(
         EmailAddress::new("user@localhost".to_string()),
         vec![EmailAddress::new("root@localhost".to_string())],
diff --git a/lettre/src/stub/mod.rs b/lettre/src/stub/mod.rs
index f817c0b59..4cf1df471 100644
--- a/lettre/src/stub/mod.rs
+++ b/lettre/src/stub/mod.rs
@@ -17,7 +17,7 @@
 //! assert!(result.is_ok());
 //! ```
 //!
-//! Will log the line:
+//! Will log (when using a logger like `env_logger`):
 //!
 //! ```text
 //! b7c211bc-9811-45ce-8cd9-68eab575d695: from=<user@localhost> to=<root@localhost>


Test patch: