[−][src]Struct async_smtp::SmtpTransport
Structure that implements the high level SMTP client
Implementations
impl<'a> SmtpTransport
[src]
pub fn new(builder: SmtpClient) -> SmtpTransport
[src]
Creates a new SMTP client
It does not connect to the server, but only creates the SmtpTransport
pub fn is_connected(&self) -> bool
[src]
Returns true if there is currently an established connection.
pub async fn connect<'_>(&'_ mut self) -> Result<(), Error>
[src]
Try to connect, if not already connected.
pub async fn command<C: Display, '_>(&'_ mut self, command: C) -> SmtpResult
[src]
Send the given SMTP command to the server.
pub async fn close<'_>(&'_ mut self) -> Result<(), Error>
[src]
Reset the client state and close the connection.
pub async fn connect_and_send<'_>(
&'_ mut self,
email: SendableEmail
) -> SmtpResult
[src]
&'_ mut self,
email: SendableEmail
) -> SmtpResult
Try to connect and then send a message.
Trait Implementations
impl PinnedDrop for SmtpTransport
[src]
impl<'a> Transport<'a> for SmtpTransport
[src]
type Result = SmtpResult
Result type for the transport
fn send<'life0, 'async_trait>(
&'life0 mut self,
email: SendableEmail
) -> Pin<Box<dyn Future<Output = SmtpResult> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
email: SendableEmail
) -> Pin<Box<dyn Future<Output = SmtpResult> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Sends an email
fn send_with_timeout<'life0, 'life1, 'async_trait>(
&'life0 mut self,
email: SendableEmail,
timeout: Option<&'life1 Duration>
) -> Pin<Box<dyn Future<Output = Self::Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
email: SendableEmail,
timeout: Option<&'life1 Duration>
) -> Pin<Box<dyn Future<Output = Self::Result> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
impl<'pin> Unpin for SmtpTransport where
__SmtpTransport<'pin>: Unpin,
[src]
__SmtpTransport<'pin>: Unpin,
impl UnsafeUnpin for SmtpTransport
[src]
Auto Trait Implementations
impl !RefUnwindSafe for SmtpTransport
impl Send for SmtpTransport
impl Sync for SmtpTransport
impl !UnwindSafe for SmtpTransport
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>,