Struct lettre::smtp::client::InnerClient [−][src]
pub struct InnerClient<S: Write + Read = NetworkStream> { /* fields omitted */ }
Expand description
Structure that implements the SMTP client
Implementations
impl<S: Write + Read> InnerClient<S>
[src]
impl<S: Write + Read> InnerClient<S>
[src]pub fn new() -> InnerClient<S>
[src]
pub fn new() -> InnerClient<S>
[src]Creates a new SMTP client
It does not connects to the server, but only creates the Client
impl<S: Connector + Write + Read + Timeout + Debug> InnerClient<S>
[src]
impl<S: Connector + Write + Read + Timeout + Debug> InnerClient<S>
[src]pub fn set_stream(&mut self, stream: S)
[src]
pub fn set_stream(&mut self, stream: S)
[src]Sets the underlying stream
pub fn upgrade_tls_stream(
&mut self,
tls_parameters: &ClientTlsParameters
) -> Result<()>
[src]
pub fn upgrade_tls_stream(
&mut self,
tls_parameters: &ClientTlsParameters
) -> Result<()>
[src]Upgrades the underlying connection to SSL/TLS
pub fn is_encrypted(&self) -> bool
[src]
pub fn is_encrypted(&self) -> bool
[src]Tells if the underlying stream is currently encrypted
pub fn connect<A: ToSocketAddrs>(
&mut self,
addr: &A,
tls_parameters: Option<&ClientTlsParameters>
) -> SmtpResult
[src]
pub fn connect<A: ToSocketAddrs>(
&mut self,
addr: &A,
tls_parameters: Option<&ClientTlsParameters>
) -> SmtpResult
[src]Connects to the configured server
pub fn is_connected(&mut self) -> bool
[src]
pub fn is_connected(&mut self) -> bool
[src]Checks if the server is connected using the NOOP SMTP command
pub fn auth(
&mut self,
mechanism: Mechanism,
credentials: &Credentials
) -> SmtpResult
[src]
pub fn auth(
&mut self,
mechanism: Mechanism,
credentials: &Credentials
) -> SmtpResult
[src]Sends an AUTH command with the given mechanism, and handles challenge if needed
pub fn message(&mut self, message: Box<dyn Read>) -> SmtpResult
[src]
pub fn message(&mut self, message: Box<dyn Read>) -> SmtpResult
[src]Sends the message content
pub fn command<C: Display>(&mut self, command: C) -> SmtpResult
[src]
pub fn command<C: Display>(&mut self, command: C) -> SmtpResult
[src]Sends an SMTP command
Trait Implementations
impl<S: Default + Write + Read> Default for InnerClient<S>
[src]
impl<S: Default + Write + Read> Default for InnerClient<S>
[src]fn default() -> InnerClient<S>
[src]
fn default() -> InnerClient<S>
[src]Returns the “default value” for a type. Read more
Auto Trait Implementations
impl<S> RefUnwindSafe for InnerClient<S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
impl<S> Send for InnerClient<S> where
S: Send,
S: Send,
impl<S> Sync for InnerClient<S> where
S: Sync,
S: Sync,
impl<S> Unpin for InnerClient<S> where
S: Unpin,
S: Unpin,
impl<S> UnwindSafe for InnerClient<S> where
S: UnwindSafe,
S: UnwindSafe,