[][src]Enum mailgun_sdk::send_message::SendMessageParam

pub enum SendMessageParam<'a, T: ?Sized> where
    T: Serialize
{ From(&'a str), To(&'a str), Cc(&'a str), Bcc(&'a str), Subject(&'a str), Text(&'a str), Html(&'a str), AmpHtml(&'a str), Attachment(&'a str), Inline(&'a str), Template(&'a str), TVersion(&'a str), TText(&'a str), OTag(&'a str), ODkim(bool), ODeliveryTime(&'a str), ODeliveryTimeOptimizePeriod(&'a str), OTimeZoneLocalize(&'a str), OTestMode(bool), OTracking(bool), OTrackingClicks(&'a str), OTrackingOpens(bool), ORequireTls(bool), OSkipVerification(bool), CustomHeader { key: &'a str, value: &'a str, }, CustomVariable { key: &'a str, value: &'a str, }, RecipientVariables(&'a T), }

A parameter for sending message from a domain.

Variants

From(&'a str)

Email address for From header.

To(&'a str)

Email address of the recipient(s). Example: "Bob bob@host.com". You can use commas to separate multiple recipients.

Cc(&'a str)

Same as To but for Cc.

Bcc(&'a str)

Same as To but for Bcc.

Subject(&'a str)

Message subject.

Text(&'a str)

Body of the message (text version).

Html(&'a str)

Body of the message (HTML version).

AmpHtml(&'a str)

AMP part of the message. Please follow google guidelines to compose and send AMP emails.

Attachment(&'a str)

File attachment. You can post multiple attachment values.

Inline(&'a str)

Attachment with inline disposition. Can be used to send inline images (see example). You can post multiple inline values.

Template(&'a str)

Name of a template stored via template API.

TVersion(&'a str)

Use this parameter to send a message to specific version of a template.

TText(&'a str)

Pass yes if you want to have rendered template in the text part of the message in case of template sending.

OTag(&'a str)

Tag string.

ODkim(bool)

Enables/disables DKIM signatures on per-message basis.

ODeliveryTime(&'a str)

Desired time of delivery. Note: Messages can be scheduled for a maximum of 3 days in the future.

ODeliveryTimeOptimizePeriod(&'a str)

Toggles Send Time Optimization (STO) on a per-message basis. String should be set to the number of hours in [0-9]+h format, with the minimum being 24h and the maximum being 72h. This value defines the time window in which Mailgun will run the optimization algorithm based on prior engagement data of a given recipient. Please note that STO is only available on certain plans.

OTimeZoneLocalize(&'a str)

Toggles Timezone Optimization (TZO) on a per message basis. String should be set to preferred delivery time in HH:mm or hh:mmaa format, where HH:mm is used for 24 hour format without AM/PM and hh:mmaa is used for 12 hour format with AM/PM. See Sending a message with TZO for details. Please note that TZO is only available on certain plans.

OTestMode(bool)

Enables sending in test mode.

OTracking(bool)

Toggles tracking on a per-message basis.

OTrackingClicks(&'a str)

Toggles clicks tracking on a per-message basis. Has higher priority than domain-level setting. Pass yes, no, true, false or htmlonly.

OTrackingOpens(bool)

Toggles opens tracking on a per-message basis. Has higher priority than domain-level setting.

ORequireTls(bool)

If true, the message will only be sent over a TLS connection. The message will fail if a TLS connection cannot be established. If false, MailGun will try to upgrade the connection, but still send over a plaintext STMP connection on failure.

OSkipVerification(bool)

If true, the certificate and hostname will not be verified when trying to establish a TLS connection.

CustomHeader

Add a custom header to the request.

Fields of CustomHeader

key: &'a strvalue: &'a str
CustomVariable

Add custom JSON data to the message.

Fields of CustomVariable

key: &'a strvalue: &'a str
RecipientVariables(&'a T)

Add JSON data that can be referenced in the message body. Each key should be a plain recipient address and each value should be a dictionary.

Trait Implementations

impl<'a, T: Debug + ?Sized> Debug for SendMessageParam<'a, T> where
    T: Serialize
[src]

impl<'a, T: ?Sized> Param for SendMessageParam<'a, T> where
    T: Serialize
[src]

Auto Trait Implementations

impl<'a, T: ?Sized> RefUnwindSafe for SendMessageParam<'a, T> where
    T: RefUnwindSafe

impl<'a, T: ?Sized> Send for SendMessageParam<'a, T> where
    T: Sync

impl<'a, T: ?Sized> Sync for SendMessageParam<'a, T> where
    T: Sync

impl<'a, T: ?Sized> Unpin for SendMessageParam<'a, T>

impl<'a, T: ?Sized> UnwindSafe for SendMessageParam<'a, T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Sealed<T> for T where
    T: ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.