Struct mailin_embedded::Server
source · pub struct Server<H>where
H: Handler + Clone + Send,{ /* private fields */ }Expand description
Server is used to configure and start the SMTP server
Implementations§
source§impl<H> Server<H>where
H: Handler + Clone + Send,
impl<H> Server<H>where H: Handler + Clone + Send,
sourcepub fn with_name<T>(&mut self, name: T) -> &mut Selfwhere
T: Into<String>,
pub fn with_name<T>(&mut self, name: T) -> &mut Selfwhere T: Into<String>,
Give the server a name
sourcepub fn with_ssl(&mut self, ssl_config: SslConfig) -> Result<&mut Self, Error>
pub fn with_ssl(&mut self, ssl_config: SslConfig) -> Result<&mut Self, Error>
Set the SSL configuration of the server
sourcepub fn with_num_threads(&mut self, num_threads: u32) -> &mut Self
pub fn with_num_threads(&mut self, num_threads: u32) -> &mut Self
Set the size of the threadpool which is equal to the maximum number of concurrent SMTP sessions.
sourcepub fn with_auth(&mut self, auth: AuthMechanism) -> &mut Self
pub fn with_auth(&mut self, auth: AuthMechanism) -> &mut Self
Add an authentication mechanism that will supported by the server
sourcepub fn with_tcp_listener(&mut self, listener: TcpListener) -> &mut Self
pub fn with_tcp_listener(&mut self, listener: TcpListener) -> &mut Self
Set a tcp listener from an already open socket