pub struct Account<'a> { /* private fields */ }Expand description
Represents the configuration of a specific account
Implementations§
Source§impl Account<'_>
impl Account<'_>
Sourcepub fn send_from(&self) -> Option<&str>
pub fn send_from(&self) -> Option<&str>
The “From” address to use when sending mail
Can be just an email address or “Some Name name@example.com”.
Sourcepub fn send_user(&self) -> Option<&str>
pub fn send_user(&self) -> Option<&str>
The user name to log in when sending mail
If not explicitly configured, this returns the value of user().
Sourcepub fn send_remote(&self) -> Option<&str>
pub fn send_remote(&self) -> Option<&str>
The remote SMTP server
If not explicitly configured, this returns the value of remote().
Sourcepub fn password(&self) -> Result<Option<String>, ConfigError>
pub fn password(&self) -> Result<Option<String>, ConfigError>
The password to log in to the remote server
Potentially executes a configured command to retrieve the password.
Returns an error if the password command has to be executed and fails. Can return Ok(None) if neither
a password nor a password command are configured. Otherwise, returns the password.
Sourcepub fn send_password(&self) -> Result<Option<String>, ConfigError>
pub fn send_password(&self) -> Result<Option<String>, ConfigError>
The password to log in to the remote server for sending mail
Potentially executes a configured command to retrieve the password.
Returns an error if the password command has to be executed and fails. Can return Ok(None) if neither
a password nor a password command are configured. Otherwise, returns the password.
Unless explicitly configured by the user, this returns the value of password().