pub struct CreateTemplateOptions { /* private fields */ }Expand description
See relevant docs.
Implementations§
Source§impl CreateTemplateOptions
impl CreateTemplateOptions
Sourcepub fn new(name: impl Into<String>, html: impl Into<String>) -> Self
pub fn new(name: impl Into<String>, html: impl Into<String>) -> Self
Creates a new CreateTemplateOptions.
name: The name of the template.html: The HTML version of the template.
Sourcepub fn with_alias(self, alias: &str) -> Self
pub fn with_alias(self, alias: &str) -> Self
Adds or overwrites the alias version of the template.
Sourcepub fn with_from(self, from: &str) -> Self
pub fn with_from(self, from: &str) -> Self
Adds or overwrites the sender email address of the template.
To include a friendly name, use the format "Your Name <sender@domain.com>".
If provided, this value can be overridden when sending an email using the template.
Sourcepub fn with_subject(self, subject: &str) -> Self
pub fn with_subject(self, subject: &str) -> Self
Adds or overwrites the sender email subject of the template.
If provided, this value can be overridden when sending an email using the template.
Sourcepub fn with_reply_to(self, reply_to: &str) -> Self
pub fn with_reply_to(self, reply_to: &str) -> Self
Attaches reply-to email address.
If provided, this value can be overridden when sending an email using the template.
Sourcepub fn with_reply_tos(self, reply_tos: &[String]) -> Self
pub fn with_reply_tos(self, reply_tos: &[String]) -> Self
Attaches reply-to email addresses.
If provided, this value can be overridden when sending an email using the template.
Sourcepub fn with_text(self, text: &str) -> Self
pub fn with_text(self, text: &str) -> Self
Adds or overwrites the The plain text version of the message.
If not provided, the HTML will be used to generate a plain text version. You can opt out of this behavior by setting value to an empty string.
Sourcepub fn with_variable(self, variable: Variable) -> Self
pub fn with_variable(self, variable: Variable) -> Self
Attaches a variable.
Each template may contain up to 20 variables.
Sourcepub fn with_variables(self, variables: &[Variable]) -> Self
pub fn with_variables(self, variables: &[Variable]) -> Self
Attaches variables.
Each template may contain up to 20 variables.
Trait Implementations§
Source§impl Clone for CreateTemplateOptions
impl Clone for CreateTemplateOptions
Source§fn clone(&self) -> CreateTemplateOptions
fn clone(&self) -> CreateTemplateOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more