pub trait Transport: Debug {
    type DataStream: MailDataStream;
    type Error;
    fn send_stream<'s, 'a>(
        &'s self,
        envelope: Envelope
    ) -> SyncFuture<'a, Result<<Self as Transport>::DataStream, <Self as Transport>::Error>>
    where
        's: 'a
; fn send<'s, 'r, 'a, R>(
        &'s self,
        envelope: Envelope,
        message: R
    ) -> SyncFuture<'a, Result<<Self as Transport>::DataStream, <Self as Transport>::Error>>
    where
        Self::DataStream: Unpin + Send + Sync,
        Self::Error: From<Error>,
        R: Read + Unpin + Send + Sync + 'r,
        's: 'a,
        'r: 'a
, { ... } }
Expand description

Transport method for emails

Associated Types

Result type for the transport

Required methods

Start sending e-mail and return a stream to write the body to

Provided methods

Send the email

Implementors