Merge pull request #184 from amousset/missing-env-logger
fix(transport-stub): Explain that a logger is needed to get logs, and…
This commit is contained in:
@@ -1,8 +1,11 @@
|
|||||||
extern crate lettre;
|
extern crate lettre;
|
||||||
|
extern crate env_logger;
|
||||||
|
|
||||||
use lettre::{EmailAddress, EmailTransport, SimpleSendableEmail, SmtpTransport};
|
use lettre::{EmailAddress, EmailTransport, SimpleSendableEmail, SmtpTransport};
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
env_logger::init().unwrap();
|
||||||
|
|
||||||
let email = SimpleSendableEmail::new(
|
let email = SimpleSendableEmail::new(
|
||||||
EmailAddress::new("user@localhost".to_string()),
|
EmailAddress::new("user@localhost".to_string()),
|
||||||
vec![EmailAddress::new("root@localhost".to_string())],
|
vec![EmailAddress::new("root@localhost".to_string())],
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
//! assert!(result.is_ok());
|
//! assert!(result.is_ok());
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! Will log the line:
|
//! Will log (when using a logger like `env_logger`):
|
||||||
//!
|
//!
|
||||||
//! ```text
|
//! ```text
|
||||||
//! b7c211bc-9811-45ce-8cd9-68eab575d695: from=<user@localhost> to=<root@localhost>
|
//! b7c211bc-9811-45ce-8cd9-68eab575d695: from=<user@localhost> to=<root@localhost>
|
||||||
|
|||||||
Reference in New Issue
Block a user