#[non_exhaustive]pub struct ServerCapabilities { /* private fields */ }Expand description
Server capabilities parsed from EHLO response (RFC 5321 Section 4.1.1.1).
Implementations§
Source§impl ServerCapabilities
impl ServerCapabilities
Sourcepub fn greeting_name(&self) -> &str
pub fn greeting_name(&self) -> &str
Returns the server’s greeting name from the EHLO response.
Sourcepub fn extensions(&self) -> &[SmtpExtension]
pub fn extensions(&self) -> &[SmtpExtension]
Returns the server’s advertised extensions.
Sourcepub fn supports_auth(&self, mechanism: &AuthMechanism) -> bool
pub fn supports_auth(&self, mechanism: &AuthMechanism) -> bool
Check if the server supports a given auth mechanism.
RFC 4954 Section 3 / RFC 4422 Section 3.1: SASL mechanism names
are case-insensitive, so this method performs case-insensitive
matching for AuthMechanism::Other variants.
Sourcepub fn supports_auth_extension(&self) -> bool
pub fn supports_auth_extension(&self) -> bool
Check if the server advertises the AUTH extension at all.
RFC 4954 Section 3: the EHLO AUTH keyword advertises support for the AUTH command and the MAIL FROM AUTH parameter.
Sourcepub fn supports_starttls(&self) -> bool
pub fn supports_starttls(&self) -> bool
Check if the server advertises STARTTLS.
Sourcepub fn supports_chunking(&self) -> bool
pub fn supports_chunking(&self) -> bool
Check if the server supports CHUNKING (BDAT).
Sourcepub fn supports_size(&self) -> bool
pub fn supports_size(&self) -> bool
Check if the server supports the SIZE extension (RFC 1870).
Returns true when the server advertises SIZE, regardless of
whether a numeric limit was included. Use Self::size_limit to
retrieve the limit value.
Sourcepub fn size_limit(&self) -> Option<u64>
pub fn size_limit(&self) -> Option<u64>
Get the SIZE limit, if advertised.
Sourcepub fn supports_8bitmime(&self) -> bool
pub fn supports_8bitmime(&self) -> bool
Check if the server supports 8BITMIME (RFC 1652).
Sourcepub fn supports_binarymime(&self) -> bool
pub fn supports_binarymime(&self) -> bool
Check if the server supports BINARYMIME (RFC 3030).
Sourcepub fn supports_8bit_or_binary(&self) -> bool
pub fn supports_8bit_or_binary(&self) -> bool
Check if the server supports either 8BITMIME (RFC 1652) or BINARYMIME (RFC 3030).
RFC 1652 Section 1 / RFC 3030 Section 2: when neither extension is advertised, the SMTP client is limited to 7-bit US-ASCII content. Either extension satisfies the requirement for non-7-bit BODY parameters.
Sourcepub fn supports_pipelining(&self) -> bool
pub fn supports_pipelining(&self) -> bool
Check if the server supports PIPELINING (RFC 1854).
Sourcepub fn supports_smtputf8(&self) -> bool
pub fn supports_smtputf8(&self) -> bool
Check if the server supports SMTPUTF8 (RFC 6531).
Sourcepub fn supports_sasl_ir(&self) -> bool
pub fn supports_sasl_ir(&self) -> bool
Check whether the server advertised the legacy SASL-IR keyword.
RFC 4954 Section 4 already allows SMTP AUTH initial responses without a separate capability. This accessor is retained only so callers can inspect the EHLO response as advertised.
Sourcepub fn supports_dsn(&self) -> bool
pub fn supports_dsn(&self) -> bool
Check if the server supports DSN (RFC 3461).
When advertised, the server accepts Delivery Status Notification parameters on MAIL FROM (RET, ENVID) and RCPT TO (NOTIFY, ORCPT) per RFC 3461 Sections 4.1–4.4.
Sourcepub fn supports_requiretls(&self) -> bool
pub fn supports_requiretls(&self) -> bool
Check if the server supports REQUIRETLS (RFC 8689).
When advertised, the client may include the REQUIRETLS parameter on MAIL FROM to enforce TLS on every hop (RFC 8689 Sections 2–4).
Sourcepub fn supports_future_release(&self) -> bool
pub fn supports_future_release(&self) -> bool
Check if the server supports FUTURERELEASE (RFC 4865).
Sourcepub fn future_release_max_interval(&self) -> Option<u64>
pub fn future_release_max_interval(&self) -> Option<u64>
Get the server-advertised FUTURERELEASE maximum hold interval in seconds, if any (RFC 4865 Section 4).
Sourcepub fn future_release_max_datetime(&self) -> Option<&str>
pub fn future_release_max_datetime(&self) -> Option<&str>
Get the server-advertised FUTURERELEASE maximum hold-until datetime string, if any (RFC 4865 Section 4).
Sourcepub fn supports_deliver_by(&self) -> bool
pub fn supports_deliver_by(&self) -> bool
Check if the server supports DELIVERBY (RFC 2852).
Sourcepub fn deliver_by_min(&self) -> Option<u64>
pub fn deliver_by_min(&self) -> Option<u64>
Get the server-advertised DELIVERBY minimum time in seconds, if any (RFC 2852 Section 2).
Sourcepub fn supports_mt_priority(&self) -> bool
pub fn supports_mt_priority(&self) -> bool
Check if the server supports MT-PRIORITY (RFC 6758).
Sourcepub fn supports_vrfy(&self) -> bool
pub fn supports_vrfy(&self) -> bool
Check if the server supports VRFY (RFC 5321 Section 4.1.1.6).
Sourcepub fn supports_expn(&self) -> bool
pub fn supports_expn(&self) -> bool
Check if the server supports EXPN (RFC 5321 Section 4.1.1.7).
Sourcepub fn supports_enhanced_status_codes(&self) -> bool
pub fn supports_enhanced_status_codes(&self) -> bool
Check if the server supports Enhanced Status Codes (RFC 2034).
When advertised, the server includes enhanced status codes
(class.subject.detail) in its response text per RFC 2034 Section 3.
Trait Implementations§
Source§impl Clone for ServerCapabilities
impl Clone for ServerCapabilities
Source§fn clone(&self) -> ServerCapabilities
fn clone(&self) -> ServerCapabilities
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more