Struct new_tokio_smtp::LocalNonSecureBuilder
source · pub struct LocalNonSecureBuilder<A>where
A: Cmd,{ /* private fields */ }
Expand description
Builder for an ConnectionConfig
for an unencrypted smtp connection.Cmd
Should only be used for test setups
Implementations§
source§impl<A> LocalNonSecureBuilder<A>where
A: Cmd,
impl<A> LocalNonSecureBuilder<A>where
A: Cmd,
sourcepub fn port(self, port: u16) -> Self
pub fn port(self, port: u16) -> Self
overrides the port to use (default: DEFAULT_SMTP_MSA_PORT
)
sourcepub fn client_id(self, client_id: ClientId) -> Self
pub fn client_id(self, client_id: ClientId) -> Self
overrides the client id to use (default: ClientId::hostname()
)
sourcepub fn auth<NA>(self, auth_cmd: NA) -> LocalNonSecureBuilder<NA>where
NA: Cmd,
pub fn auth<NA>(self, auth_cmd: NA) -> LocalNonSecureBuilder<NA>where
NA: Cmd,
sets the auth command to use (default no authentication)
pub fn build(self) -> ConnectionConfig<A, DefaultTlsSetup>
sourcepub fn connect(
self
) -> impl Future<Item = Connection, Error = ConnectingFailed> + Send
pub fn connect(
self
) -> impl Future<Item = Connection, Error = ConnectingFailed> + Send
Calls Connection::connect(self.build())
.