pub struct SendEmailWithTemplateRequest {Show 15 fields
pub from: String,
pub to: String,
pub template_id: Option<i64>,
pub template_alias: Option<String>,
pub template_model: TemplateModel,
pub cc: Option<String>,
pub bcc: Option<String>,
pub tag: Option<String>,
pub reply_to: Option<String>,
pub headers: Option<Vec<Header>>,
pub track_opens: Option<bool>,
pub track_links: Option<TrackLink>,
pub attachments: Option<Vec<Attachment>>,
pub metadata: Option<HashMap<String, String>>,
pub message_stream: Option<String>,
}Expand description
Send a Single email with a template.
let mut model = TemplateModel::default();
model.insert("name", "Ferris");
let req = SendEmailWithTemplateRequest::builder()
.from("me@example.com")
.to("you@example.com")
.template_model(model)
.build();Fields§
§from: StringThe sender email address. Must have a registered and confirmed Sender Signature.
To include a name, use the format Full Name <sender@domain.com> for the address.
to: StringRecipient email address. Multiple addresses are comma separated. Max 50.
template_id: Option<i64>The template ID. One of template_id or template_alias must be provided.
template_alias: Option<String>The template alias. One of template_id or template_alias must be provided.
template_model: TemplateModelThe template model.
cc: Option<String>Cc recipient email address. Multiple addresses are comma separated. Max 50.
bcc: Option<String>Bcc recipient email address. Multiple addresses are comma separated. Max 50.
tag: Option<String>Email tag that allows you to categorize outgoing emails and get detailed statistics.
reply_to: Option<String>Reply To override email address. Defaults to the Reply To set in the sender signature.
headers: Option<Vec<Header>>List of custom headers to include.
track_opens: Option<bool>Activate open tracking for this email.
track_links: Option<TrackLink>Activate link tracking for links in the HTML or Text bodies of this email.
attachments: Option<Vec<Attachment>>List of attachments
metadata: Option<HashMap<String, String>>Custom metadata key/value pairs.
message_stream: Option<String>Set message stream ID that’s used for sending. If not provided, message will default to the “outbound” transactional stream.
Implementations§
Source§impl SendEmailWithTemplateRequest
impl SendEmailWithTemplateRequest
Sourcepub fn builder() -> SendEmailWithTemplateRequestBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> SendEmailWithTemplateRequestBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building SendEmailWithTemplateRequest.
On the builder, call .from(...), .to(...), .template_id(...)(optional), .template_alias(...)(optional), .template_model(...)(optional), .cc(...)(optional), .bcc(...)(optional), .tag(...)(optional), .reply_to(...)(optional), .headers(...)(optional), .track_opens(...)(optional), .track_links(...)(optional), .attachments(...)(optional), .metadata(...)(optional), .message_stream(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of SendEmailWithTemplateRequest.
Trait Implementations§
Source§impl Clone for SendEmailWithTemplateRequest
impl Clone for SendEmailWithTemplateRequest
Source§fn clone(&self) -> SendEmailWithTemplateRequest
fn clone(&self) -> SendEmailWithTemplateRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SendEmailWithTemplateRequest
impl Debug for SendEmailWithTemplateRequest
Source§impl Default for SendEmailWithTemplateRequest
impl Default for SendEmailWithTemplateRequest
Source§fn default() -> SendEmailWithTemplateRequest
fn default() -> SendEmailWithTemplateRequest
Source§impl<'de> Deserialize<'de> for SendEmailWithTemplateRequest
impl<'de> Deserialize<'de> for SendEmailWithTemplateRequest
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>,
Source§impl PartialEq for SendEmailWithTemplateRequest
impl PartialEq for SendEmailWithTemplateRequest
Source§fn eq(&self, other: &SendEmailWithTemplateRequest) -> bool
fn eq(&self, other: &SendEmailWithTemplateRequest) -> bool
self and other values to be equal, and is used by ==.