[−][src]Struct lettre::smtp::client::InnerClient
Structure that implements the SMTP client
Methods
impl<S: Write + Read> 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]
pub fn close(&mut self)
[src]
Closes the SMTP transaction if possible
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]
&mut self,
tls_parameters: &ClientTlsParameters
) -> Result<()>
Upgrades the underlying connection to SSL/TLS
pub fn is_encrypted(&self) -> bool
[src]
Tells if the underlying stream is currently encrypted
pub fn set_timeout(&mut self, duration: Option<Duration>) -> Result<()>
[src]
Set timeout
pub fn connect<A: ToSocketAddrs>(
&mut self,
addr: &A,
tls_parameters: Option<&ClientTlsParameters>
) -> SmtpResult
[src]
&mut self,
addr: &A,
tls_parameters: Option<&ClientTlsParameters>
) -> SmtpResult
Connects to the configured server
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]
&mut self,
mechanism: Mechanism,
credentials: &Credentials
) -> SmtpResult
Sends an AUTH command with the given mechanism, and handles challenge if needed
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]
Sends an SMTP command
Trait Implementations
impl<S: Default + Write + Read> Default for InnerClient<S>
[src]
fn default() -> InnerClient<S>
[src]
impl<S: Debug + Write + Read> Debug for InnerClient<S>
[src]
Auto Trait Implementations
impl<S> Send for InnerClient<S> where
S: Send,
S: Send,
impl<S> Sync for InnerClient<S> where
S: Sync,
S: Sync,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,