pub struct MailSection {
pub host: String,
pub port: u16,
pub encryption: MailEncryption,
pub from: String,
pub username: Option<String>,
}Expand description
Non-secret SMTP connection settings. Lives here (rather than in wire)
because it’s the shape mail::Mailer::from_config builds from, but it’s
carried operator-editably in the server_settings KV bucket
(wire::ServerSettings::mail / SPA), not in backend.toml (#884).
Serialize is derived for the KV / API path; the SMTP password is never
a field here — it comes from the MailPassword registry secret (or
$KANADE_MAIL_PASSWORD), keeping secrets out of the KV.
Fields§
§host: StringSMTP relay host (e.g. an internal mail relay).
port: u16SMTP port — 587 (STARTTLS), 465 (implicit TLS), or 25 (plain).
encryption: MailEncryption§from: StringEnvelope/From address every kanade email is sent as.
username: Option<String>SMTP AUTH username. Omit for an unauthenticated internal relay;
when set, pair it with the MailPassword secret.
Trait Implementations§
Source§impl Clone for MailSection
impl Clone for MailSection
Source§fn clone(&self) -> MailSection
fn clone(&self) -> MailSection
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 MailSection
impl Debug for MailSection
Source§impl<'de> Deserialize<'de> for MailSection
impl<'de> Deserialize<'de> for MailSection
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
impl Eq for MailSection
Source§impl PartialEq for MailSection
impl PartialEq for MailSection
Source§fn eq(&self, other: &MailSection) -> bool
fn eq(&self, other: &MailSection) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for MailSection
impl Serialize for MailSection
impl StructuralPartialEq for MailSection
Auto Trait Implementations§
impl Freeze for MailSection
impl RefUnwindSafe for MailSection
impl Send for MailSection
impl Sync for MailSection
impl Unpin for MailSection
impl UnsafeUnpin for MailSection
impl UnwindSafe for MailSection
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.