EmailMessage (src/email.rs)

hyperswitch · crates/cloud_services/src/email.rs · rust · Apache-2.0
email, tag:knn-classified

Defines an email message with sender, recipients, subject, and HTML body.

// Source: https://github.com/juspay/hyperswitch | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
//! Email delivery clients.

#[cfg(feature = "ses")]
pub mod ses;
#[cfg(feature = "smtp")]
pub mod smtp;

/// One email to send. Addresses are plain strings; the client sending it checks them.
#[derive(Clone, Debug)]
pub struct EmailMessage {
    /// The sender's address.
    pub from: String,
    /// Recipients.
    pub to: Vec<String>,
    /// Copied recipients.
    pub cc: Vec<String>,
    /// Blind-copied recipients.
    pub bcc: Vec<String>,
    /// The subject line.
    pub subject: String,
    /// The HTML body.
    pub html_body: String,
}

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key