pub struct EmailMessage {Show 14 fields
pub id: String,
pub from: EmailAddress,
pub reply_to: Option<EmailAddress>,
pub recipients: EmailRecipients,
pub subject: String,
pub text: Option<String>,
pub html: Option<String>,
pub attachments: Vec<EmailAttachment>,
pub headers: HashMap<String, String>,
pub template_data: Option<HashMap<String, Value>>,
pub created_at: DateTime<Utc>,
pub scheduled_at: Option<DateTime<Utc>>,
pub priority: EmailPriority,
pub tracking: bool,
}Expand description
Email message
Fields§
§id: StringUnique message ID
from: EmailAddressSender email address
reply_to: Option<EmailAddress>Reply-to email address (optional)
recipients: EmailRecipientsRecipients (to, cc, bcc)
subject: StringEmail subject
text: Option<String>Plain text content
html: Option<String>HTML content
attachments: Vec<EmailAttachment>Attachments
headers: HashMap<String, String>Custom headers
template_data: Option<HashMap<String, Value>>Template variables (for template rendering)
created_at: DateTime<Utc>Message creation timestamp
scheduled_at: Option<DateTime<Utc>>Scheduled send time (optional)
priority: EmailPriorityPriority level
tracking: boolWhether to track opens and clicks
Implementations§
Source§impl EmailMessage
impl EmailMessage
Sourcepub fn builder() -> EmailMessageBuilder
pub fn builder() -> EmailMessageBuilder
Create new email message builder
Sourcepub fn primary_content(&self) -> Option<&str>
pub fn primary_content(&self) -> Option<&str>
Get primary content (HTML preferred, fallback to text)
Sourcepub fn has_attachments(&self) -> bool
pub fn has_attachments(&self) -> bool
Check if message has attachments
Sourcepub fn attachment_size(&self) -> usize
pub fn attachment_size(&self) -> usize
Get total attachment size
Trait Implementations§
Source§impl Clone for EmailMessage
impl Clone for EmailMessage
Source§impl Debug for EmailMessage
impl Debug for EmailMessage
Source§impl<'de> Deserialize<'de> for EmailMessage
impl<'de> Deserialize<'de> for EmailMessage
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 EmailMessage
impl RefUnwindSafe for EmailMessage
impl Send for EmailMessage
impl Sync for EmailMessage
impl Unpin for EmailMessage
impl UnsafeUnpin for EmailMessage
impl UnwindSafe for EmailMessage
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