[−][src]Struct lettre::transport::smtp::client::SmtpConnection
Structure that implements the SMTP client
Implementations
impl SmtpConnection
[src]
pub fn server_info(&self) -> &ServerInfo
[src]
pub fn connect<A: ToSocketAddrs>(
server: A,
timeout: Option<Duration>,
hello_name: &ClientId,
tls_parameters: Option<&TlsParameters>
) -> Result<SmtpConnection, Error>
[src]
server: A,
timeout: Option<Duration>,
hello_name: &ClientId,
tls_parameters: Option<&TlsParameters>
) -> Result<SmtpConnection, Error>
Connects to the configured server
Sends EHLO and parses server information
pub fn send(
&mut self,
envelope: &Envelope,
email: &[u8]
) -> Result<Response, Error>
[src]
&mut self,
envelope: &Envelope,
email: &[u8]
) -> Result<Response, Error>
pub fn has_broken(&self) -> bool
[src]
pub fn can_starttls(&self) -> bool
[src]
pub fn starttls(
&mut self,
tls_parameters: &TlsParameters,
hello_name: &ClientId
) -> Result<(), Error>
[src]
&mut self,
tls_parameters: &TlsParameters,
hello_name: &ClientId
) -> Result<(), Error>
pub fn quit(&mut self) -> Result<Response, Error>
[src]
pub fn abort(&mut self)
[src]
pub fn set_stream(&mut self, stream: NetworkStream)
[src]
Sets the underlying stream
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 test_connected(&mut self) -> bool
[src]
Checks if the server is connected using the NOOP SMTP command
pub fn auth(
&mut self,
mechanisms: &[Mechanism],
credentials: &Credentials
) -> Result<Response, Error>
[src]
&mut self,
mechanisms: &[Mechanism],
credentials: &Credentials
) -> Result<Response, Error>
Sends an AUTH command with the given mechanism, and handles challenge if needed
pub fn message(&mut self, message: &[u8]) -> Result<Response, Error>
[src]
Sends the message content
pub fn command<C: Display>(&mut self, command: C) -> Result<Response, Error>
[src]
Sends an SMTP command
pub fn read_response(&mut self) -> Result<Response, Error>
[src]
Gets the SMTP response
Auto Trait Implementations
impl !RefUnwindSafe for SmtpConnection
impl Send for SmtpConnection
impl Sync for SmtpConnection
impl Unpin for SmtpConnection
impl !UnwindSafe for SmtpConnection
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,