pub struct RelayConfig {
pub host: String,
pub port: u16,
pub username: Option<String>,
pub password: Option<String>,
pub use_tls: bool,
}Expand description
Outbound SMTP relay (“smart-host”) configuration.
When present, rusmes forwards all outbound mail through the specified relay instead of delivering directly via DNS MX lookup.
Fields§
§host: StringRequired. Hostname or IP address of the upstream SMTP relay.
port: u16Required. TCP port of the upstream SMTP relay (e.g. 587 or 25).
username: Option<String>Default: None. Optional SMTP AUTH username for the relay.
password: Option<String>Default: None. Optional SMTP AUTH password for the relay.
use_tls: boolDefault: true. When true, the relay connection is secured with
TLS (STARTTLS or implicit TLS depending on the relay port).
Trait Implementations§
Source§impl Clone for RelayConfig
impl Clone for RelayConfig
Source§fn clone(&self) -> RelayConfig
fn clone(&self) -> RelayConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RelayConfig
impl Debug for RelayConfig
Source§impl<'de> Deserialize<'de> for RelayConfig
impl<'de> Deserialize<'de> for RelayConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RelayConfig
impl RefUnwindSafe for RelayConfig
impl Send for RelayConfig
impl Sync for RelayConfig
impl Unpin for RelayConfig
impl UnsafeUnpin for RelayConfig
impl UnwindSafe for RelayConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more