pub struct Email {
pub from: EmailAddress,
pub to: Vec<EmailAddress>,
pub subject: String,
pub body_html: String,
pub body_text: String,
pub reply_to: Option<Vec<EmailAddress>>,
pub cc: Option<Vec<EmailAddress>>,
pub bcc: Option<Vec<EmailAddress>>,
pub mkind: String,
}Expand description
add an email to the offline email queue, so that the email can be sent later. these emails get picked up by the email worker.
§Arguments
from- (name, email)to- Vec<(name, email)>subject- email subjectbody_html- email body in html formatbody_text- email body in text formatreply_to- (name, email)mkind- mkind is any string, used for product analytics, etc. the value should be dot separated, e.g. x.y.z to capture hierarchy. ideally you should usemarketing.as the prefix for all marketing related emails, and anything else for transaction mails, so your mailer can use appropriate channelscc,bcc- Vec<(name, email)>
Fields§
§from: EmailAddress§to: Vec<EmailAddress>§subject: String§body_html: String§body_text: String§reply_to: Option<Vec<EmailAddress>>§cc: Option<Vec<EmailAddress>>§bcc: Option<Vec<EmailAddress>>§mkind: StringTrait Implementations§
Source§impl<'de> Deserialize<'de> for Email
impl<'de> Deserialize<'de> for Email
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 Email
impl RefUnwindSafe for Email
impl Send for Email
impl Sync for Email
impl Unpin for Email
impl UnwindSafe for Email
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