Struct async_smtp::SmtpClient
source · pub struct SmtpClient { /* private fields */ }Expand description
Contains client configuration
Implementations§
source§impl SmtpClient
impl SmtpClient
Builder for the SMTP SmtpTransport
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new SMTP client.
It does not connect to the server, but only creates the SmtpTransport.
Defaults are:
- No authentication
- No SMTPUTF8 support
sourcepub fn smtp_utf8(self, enabled: bool) -> SmtpClient
pub fn smtp_utf8(self, enabled: bool) -> SmtpClient
Enable SMTPUTF8 if the server supports it
sourcepub fn pipelining(self, enabled: bool) -> SmtpClient
pub fn pipelining(self, enabled: bool) -> SmtpClient
Enable PIPELINING if the server supports it
sourcepub fn hello_name(self, name: ClientId) -> SmtpClient
pub fn hello_name(self, name: ClientId) -> SmtpClient
Set the name used during EHLO
sourcepub fn without_greeting(self) -> SmtpClient
pub fn without_greeting(self) -> SmtpClient
Do not expect greeting.
Could be used for STARTTLS connections.