Struct lettre::smtp::SmtpTransport
[−]
[src]
pub struct SmtpTransport { /* fields omitted */ }
Structure that implements the high level SMTP client
Methods
impl<'a> SmtpTransport
[src]
pub fn simple_builder(domain: &str) -> Result<SmtpTransportBuilder, Error>
[src]
Simple and secure transport, should be used when possible. Creates an encrypted transport over submission port, using the provided domain to validate TLS certificates.
pub fn builder<A: ToSocketAddrs>(
addr: A,
security: ClientSecurity
) -> Result<SmtpTransportBuilder, Error>
[src]
addr: A,
security: ClientSecurity
) -> Result<SmtpTransportBuilder, Error>
Creates a new configurable builder
pub fn builder_unencrypted_localhost() -> Result<SmtpTransportBuilder, Error>
[src]
Creates a new local SMTP client to port 25
pub fn new(builder: SmtpTransportBuilder) -> SmtpTransport
[src]
Creates a new SMTP client
It does not connect to the server, but only creates the SmtpTransport
pub fn close(&mut self)
[src]
Reset the client state
Trait Implementations
impl<'a, T: Read + 'a> EmailTransport<'a, T, SmtpResult> for SmtpTransport
[src]
fn send<U: SendableEmail<'a, T> + 'a>(&mut self, email: &'a U) -> SmtpResult
[src]
Sends an email