Struct mailslurp::models::send_email_options::SendEmailOptions[][src]

pub struct SendEmailOptions {
Show 18 fields pub add_tracking_pixel: Option<bool>, pub attachments: Option<Vec<String>>, pub bcc: Option<Vec<String>>, pub body: Option<String>, pub cc: Option<Vec<String>>, pub charset: Option<String>, pub from: Option<String>, pub html: Option<bool>, pub is_html: Option<bool>, pub reply_to: Option<String>, pub send_strategy: Option<SendStrategy>, pub subject: Option<String>, pub template: Option<String>, pub template_variables: Option<Value>, pub to: Option<Vec<String>>, pub to_contacts: Option<Vec<String>>, pub to_group: Option<String>, pub use_inbox_name: Option<bool>,
}
Expand description

SendEmailOptions : Options for sending an email message from an inbox. You must provide one of: to, toGroup, or toContacts to send an email. All other parameters are optional.

Fields

add_tracking_pixel: Option<bool>

Add tracking pixel to email

attachments: Option<Vec<String>>

Optional list of attachment IDs to send with this email. You must first upload each attachment separately via method call or dashboard in order to obtain attachment IDs. This way you can reuse attachments with different emails once uploaded. There are several ways to upload that support multi-part form, base64 file encoding, and octet stream binary uploads. See the UploadController for available methods.

bcc: Option<Vec<String>>

Optional list of bcc destination email addresses

body: Option<String>

Optional contents of email. If body contains HTML then set isHTML to true to ensure that email clients render it correctly. You can use moustache template syntax in the email body in conjunction with toGroup contact variables or templateVariables data. If you need more templating control consider creating a template and using the template property instead of the body.

cc: Option<Vec<String>>

Optional list of cc destination email addresses

charset: Option<String>

Optional charset

from: Option<String>

Optional from address. Email address is RFC 5322 format and may include a display name and email in angle brackets (my@address.com or My inbox <my@address.com>). If no sender is set the source inbox address will be used for this field. If you set useInboxName to true the from field will include the inbox name as a display name: inbox_name <inbox@address.com>. For this to work use the name field when creating an inbox. Beware of potential spam penalties when setting the from field to an address not used by the inbox. Your emails may get blocked by services if you impersonate another address. To use a custom email addresses use a custom domain. You can create domains with the DomainController. The domain must be verified in the dashboard before it can be used.

html: Option<bool>

Optional HTML flag to indicate that contents is HTML. Set’s a content-type: text/html for email. (Deprecated: use isHTML instead.)

is_html: Option<bool>

Optional HTML flag. If true the content-type of the email will be text/html. Set to true when sending HTML to ensure proper rending on email clients

reply_to: Option<String>

Optional replyTo header

send_strategy: Option<SendStrategy>

Optional strategy to use when sending the email

subject: Option<String>

Optional email subject line

template: Option<String>

Optional template ID to use for body. Will override body if provided. When using a template make sure you pass the corresponding map of templateVariables. You can find which variables are needed by fetching the template itself or viewing it in the dashboard.

template_variables: Option<Value>

Optional map of template variables. Will replace moustache syntax variables in subject and body or template with the associated values if found.

to: Option<Vec<String>>

List of destination email addresses. Each email address must be RFC 5322 format. Even single recipients must be in array form. Maximum recipients per email depends on your plan. If you need to send many emails try using contacts or contact groups or use a non standard sendStrategy to ensure that spam filters are not triggered (many recipients in one email can affect your spam rating). Be cautious when sending emails that your recipients exist. High bounce rates (meaning a high percentage of emails cannot be delivered because an address does not exist) can result in account freezing.

to_contacts: Option<Vec<String>>

Optional list of contact IDs to send email to. Manage your contacts via the API or dashboard. When contacts are used the email is sent to each contact separately so they will not see other recipients.

to_group: Option<String>

Optional contact group ID to send email to. You can create contacts and contact groups in the API or dashboard and use them for email campaigns. When contact groups are used the email is sent to each contact separately so they will not see other recipients

use_inbox_name: Option<bool>

Use name of inbox as sender email address name. Will construct RFC 5322 email address with Inbox name <inbox@address.com> if the inbox has a name.

Implementations

Options for sending an email message from an inbox. You must provide one of: to, toGroup, or toContacts to send an email. All other parameters are optional.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.