[−][src]Function mail_smtp::send
pub fn send<A, S>(
mail: MailRequest,
conconf: ConnectionConfig<A, S>,
ctx: impl Context
) -> impl Future<Item = (), Error = MailSendError> where
A: Cmd,
S: SetupTls,
Sends a given mail (request).
- This will use the given context to encode the mail.
- Then it will use the connection config to open a connection to a mail server (likely a Mail Submission Agent (MSA)).
- Following this it will send the mail to the server.
- After which it will close the connection again.
You can use MailRequest: From<Mail>
(i.e. mail.into()
) to pass in
a mail and derive the envelop data (from, to) from it or create your own
mail request if different smtp envelop data is needed.