mirror of
https://github.com/chatmail/core.git
synced 2026-04-27 02:16:29 +03:00
Move strict_tls, max_smtp_rcpt_to from Provider to ProviderOptions
This commit is contained in:
@@ -129,13 +129,6 @@ pub struct Provider {
|
||||
/// Default configuration values to set when provider is configured.
|
||||
pub config_defaults: Option<Vec<ConfigDefault>>,
|
||||
|
||||
/// True if provider is known to use use proper,
|
||||
/// not self-signed certificates.
|
||||
pub strict_tls: bool,
|
||||
|
||||
/// Maximum number of recipients the provider allows to send a single email to.
|
||||
pub max_smtp_rcpt_to: Option<u16>,
|
||||
|
||||
/// Type of OAuth 2 authorization if provider supports it.
|
||||
pub oauth2_authorizer: Option<Oauth2Authorizer>,
|
||||
|
||||
@@ -144,12 +137,29 @@ pub struct Provider {
|
||||
}
|
||||
|
||||
/// Provider options with good defaults.
|
||||
#[derive(Debug, Default, PartialEq, Eq)]
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub struct ProviderOptions {
|
||||
/// True if provider is known to use use proper,
|
||||
/// not self-signed certificates.
|
||||
pub strict_tls: bool,
|
||||
|
||||
/// Maximum number of recipients the provider allows to send a single email to.
|
||||
pub max_smtp_rcpt_to: Option<u16>,
|
||||
|
||||
/// Move messages to the Trash folder instead of marking them "\Deleted".
|
||||
pub delete_to_trash: bool,
|
||||
}
|
||||
|
||||
impl Default for ProviderOptions {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
strict_tls: true,
|
||||
max_smtp_rcpt_to: None,
|
||||
delete_to_trash: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Get resolver to query MX records.
|
||||
///
|
||||
/// We first try to read the system's resolver from `/etc/resolv.conf`.
|
||||
|
||||
Reference in New Issue
Block a user