aster_forge_mail/message.rs
1//! Product-neutral mail message models.
2//!
3//! These types describe the message envelope and rendered body passed between product mail
4//! services, outbox workers, and test senders. They intentionally do not include product error
5//! types, audit context, persistence metadata, or delivery state.
6
7/// Address and optional display name for a mail sender or recipient.
8#[derive(Debug, Clone, PartialEq, Eq)]
9pub struct MailRecipient {
10 /// Email address used by the transport layer.
11 pub address: String,
12 /// Optional display name shown by mail clients.
13 pub display_name: Option<String>,
14}
15
16/// Fully rendered mail message ready for a product-owned sender.
17#[derive(Debug, Clone, PartialEq, Eq)]
18pub struct MailMessage {
19 /// Sender mailbox.
20 pub from: MailRecipient,
21 /// Recipient mailbox.
22 pub to: MailRecipient,
23 /// Rendered subject line.
24 pub subject: String,
25 /// Plain-text message body.
26 pub text_body: String,
27 /// HTML message body.
28 pub html_body: String,
29}