Document authentication mecanism configuration

This commit is contained in:
Alexis Mousset
2015-08-02 19:23:29 +02:00
parent 1830f084c0
commit 7f6aa0ffae
2 changed files with 3 additions and 1 deletions

View File

@@ -56,6 +56,7 @@
//! ```rust,no_run
//! use smtp::sender::{Sender, SenderBuilder};
//! use smtp::email::EmailBuilder;
//! use smtp::authentication::Mecanism;
//!
//! let mut builder = EmailBuilder::new();
//! builder = builder.to(("user@example.org", "Alias name"));
@@ -76,6 +77,8 @@
//! .hello_name("my.hostname.tld")
//! // Add credentials for authentication
//! .credentials("username", "password")
//! // Configure accepted authetication mecanisms
//! .authentication_mecanisms(vec![Mecanism::CramMd5])
//! // Enable connection reuse
//! .enable_connection_reuse(true).build();
//!

View File

@@ -201,7 +201,6 @@ impl Sender {
}
if self.client_info.credentials.is_some() && self.state.connection_reuse_count == 0 {
let (username, password) = self.client_info.credentials.clone().unwrap();
let mut found = false;