/// Creates a new SMTP client
///
/// Defaults are:
///
/// * No connection reuse
/// * No authentication
/// * No SMTPUTF8 support
/// * A 60 seconds timeout for smtp commands
Creates a new SMTP client
Defaults are.

No connection reuse
No authentication
No SMTPUTF8 support
A 60 seconds timeout for smtp commands
Creates a new SMTP client Defaults are . No connection reuse No authentication No SMTPUTF8 support A 60 seconds timeout for smtp commands
pub fn new<A: ToSocketAddrs>(addr: A,
                                 security: ClientSecurity)
                                 -> Result<SmtpTransportBuilder, Error> {
        let mut addresses = addr.to_socket_addrs()?;
        match addresses.next() {
            Some(addr) => {
                Ok(SmtpTransportBuilder { server_addr:              addr,
                       security:                 security,
                       smtp_utf8:                false,
                       credentials:              None,
                       connection_reuse:         ConnectionReuseParameters::NoReuse,
                       hello_name:               ClientId::hostname(),
                       authentication_mechanism: None,
                       timeout:                  Some(Duration::new(60, 0)), })
            }
            None => Err(Error::Resolution),
        }
    }
pub fn new < A : ToSocketAddrs > ( addr : A , security : ClientSecurity ) -> Result < SmtpTransportBuilder , Error > { let mut addresses = addr . to_socket_addrs ( ) ? ; match addresses . next ( ) { Some ( addr ) => { Ok ( SmtpTransportBuilder { server_addr : addr , security : security , smtp_utf8 : false , credentials : None , connection_reuse : ConnectionReuseParameters :: NoReuse , hello_name : ClientId :: hostname ( ) , authentication_mechanism : None , timeout : Some ( Duration :: new ( 60 , 0 ) ) , } ) } None => Err ( Error :: Resolution ) , } }
Creates a new SMTP client
Defaults are:
Creates a new SMTP client Defaults are :
addr
A
security
ClientSecurity