IntermediateString (src/email.rs)

hyperswitch · crates/external_services/src/email.rs · rust · Apache-2.0
email

Defines email client traits and utilities for sending templated emails via SES, SMTP, or no-op, with rich text conversion.

// 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.
//! Sending email through AWS SES or an SMTP server.
//!
//! The clients themselves are the shared [`cloud_services::email`] ones; this module adds
//! Hyperswitch's templating ([`EmailData`]), settings and error reporting.

use common_utils::{errors::CustomResult, pii};
use serde::Deserialize;

/// Implementation of aws ses client
pub mod ses;

/// Implementation of SMTP server client
pub mod smtp;

/// Implementation of Email client when email support is disabled
pub mod no_email;

/// Custom Result type alias for Email operations.
pub type EmailResult<T> = CustomResult<T, EmailError

... (truncated -- full source via MCP)

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

Get a free API key