pub struct EmailMessageBuilder { /* private fields */ }Expand description
Email message builder
Implementations§
Source§impl EmailMessageBuilder
impl EmailMessageBuilder
Sourcepub fn from(self, from: impl Into<EmailAddress>) -> Self
pub fn from(self, from: impl Into<EmailAddress>) -> Self
Set sender
Sourcepub fn reply_to(self, reply_to: impl Into<EmailAddress>) -> Self
pub fn reply_to(self, reply_to: impl Into<EmailAddress>) -> Self
Set reply-to
Sourcepub fn to(self, to: impl Into<EmailAddress>) -> Self
pub fn to(self, to: impl Into<EmailAddress>) -> Self
Add ‘to’ recipient
Sourcepub fn to_many(self, to: Vec<EmailAddress>) -> Self
pub fn to_many(self, to: Vec<EmailAddress>) -> Self
Add multiple ‘to’ recipients
Sourcepub fn cc(self, cc: impl Into<EmailAddress>) -> Self
pub fn cc(self, cc: impl Into<EmailAddress>) -> Self
Add CC recipient
Sourcepub fn bcc(self, bcc: impl Into<EmailAddress>) -> Self
pub fn bcc(self, bcc: impl Into<EmailAddress>) -> Self
Add BCC recipient
Sourcepub fn attachment(self, attachment: EmailAttachment) -> Self
pub fn attachment(self, attachment: EmailAttachment) -> Self
Add attachment
Sourcepub fn header(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn header(self, key: impl Into<String>, value: impl Into<String>) -> Self
Add custom header
Sourcepub fn template_data(self, data: HashMap<String, Value>) -> Self
pub fn template_data(self, data: HashMap<String, Value>) -> Self
Set template data
Sourcepub fn scheduled_at(self, time: DateTime<Utc>) -> Self
pub fn scheduled_at(self, time: DateTime<Utc>) -> Self
Set scheduled send time
Sourcepub fn priority(self, priority: EmailPriority) -> Self
pub fn priority(self, priority: EmailPriority) -> Self
Set priority
Sourcepub fn build(self) -> EmailMessage
pub fn build(self) -> EmailMessage
Build the email message
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EmailMessageBuilder
impl RefUnwindSafe for EmailMessageBuilder
impl Send for EmailMessageBuilder
impl Sync for EmailMessageBuilder
impl Unpin for EmailMessageBuilder
impl UnsafeUnpin for EmailMessageBuilder
impl UnwindSafe for EmailMessageBuilder
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