pub struct EmailConfig {
pub from: String,
pub to: Vec<String>,
pub cc: Vec<String>,
pub subject_prefix: Option<String>,
pub smtp: Option<SmtpConfig>,
pub ses: Option<SesConfig>,
pub template: TemplateConfig,
}Expand description
Serialize as well, so a build without the AWS feature can hand the
config to the opssignal[aws] add-on.
Fields§
§from: StringSender, as alerts@example.com or OpsSignal <alerts@example.com>.
to: Vec<String>At least one recipient.
cc: Vec<String>§subject_prefix: Option<String>Put before the subject, such as [opssignal], for mail filters.
smtp: Option<SmtpConfig>Send through an SMTP server. Exactly one of smtp and ses.
ses: Option<SesConfig>Send through the Amazon SES API with the AWS credential chain;
needs the aws add-on.
template: TemplateConfigReplaces parts of the message; see crate::template.
Implementations§
Source§impl EmailConfig
impl EmailConfig
Sourcepub fn transport(&self) -> Option<EmailTransport<'_>>
pub fn transport(&self) -> Option<EmailTransport<'_>>
The transport; EmailConfig::check makes sure there is
exactly one.
Trait Implementations§
Source§impl Clone for EmailConfig
impl Clone for EmailConfig
Source§fn clone(&self) -> EmailConfig
fn clone(&self) -> EmailConfig
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 EmailConfig
impl Debug for EmailConfig
Source§impl<'de> Deserialize<'de> for EmailConfig
impl<'de> Deserialize<'de> for EmailConfig
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 EmailConfig
impl RefUnwindSafe for EmailConfig
impl Send for EmailConfig
impl Sync for EmailConfig
impl Unpin for EmailConfig
impl UnsafeUnpin for EmailConfig
impl UnwindSafe for EmailConfig
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