pub struct SettingsMail {
    pub client: Client,
}

Fields§

§client: Client

Implementations§

source§

impl SettingsMail

source

pub async fn get_mail_settings( &self, limit: i64, offset: i64 ) -> Result<Response<GetMailSettingsResponse>, ClientError>

Retrieve all mail settings.

This function performs a GET to the /mail_settings endpoint.

This endpoint allows you to retrieve a list of all mail settings.

Each setting will be returned with an enabled status set to true or false and a short description that explains what the setting does.

Parameters:

  • limit: i64 – The number of settings to return.
  • offset: i64 – Where in the list of results to begin displaying settings.
  • on_behalf_of: &str – The license key provided with your New Relic account.
source

pub async fn get_mail_settings_address_whitelist( &self ) -> Result<Response<MailSettingsAddressWhitelabel>, ClientError>

Retrieve address whitelist mail settings.

This function performs a GET to the /mail_settings/address_whitelist endpoint.

This endpoint allows you to retrieve your current email address whitelist settings.

The Address Whitelist setting allows you to specify email addresses or domains for which mail should never be suppressed.

For example, if you own the domain example.com, and one or more of your recipients use email@example.com addresses, placing example.com in the address whitelist setting instructs Twilio SendGrid to ignore all bounces, blocks, and unsubscribes logged for that domain. In other words, all bounces, blocks, and unsubscribes will still be sent to example.com as if they were sent under normal sending conditions.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.
source

pub async fn patch_mail_settings_address_whitelist( &self, body: &PatchMailSettingsAddressWhitelistRequest ) -> Result<Response<MailSettingsAddressWhitelabel>, ClientError>

Update address whitelist mail settings.

This function performs a PATCH to the /mail_settings/address_whitelist endpoint.

This endpoint allows you to update your current email address whitelist settings.

You can select whether or not this setting should be enabled by assigning the enabled field a true or false value.

Passing only the enabled field to this endpoint will not alter your current list of whitelist entries. However, any modifications to your list of entries will overwrite the entire list. For this reason, you must included all existing entries you wish to retain in your list in addition to any new entries you intend to add. To remove one or more list entries, pass a list with only the entries you wish to retain.

You should not add generic domains such as gmail.com or yahoo.com in your list because your emails will not honor recipients’ unsubscribes. This may cause a legal violation of CAN-SPAM and could damage your sending reputation.

The Address Whitelist setting allows you to specify email addresses or domains for which mail should never be suppressed.

For example, if you own the domain example.com, and one or more of your recipients use email@example.com addresses, placing example.com in the address whitelist setting instructs Twilio SendGrid to ignore all bounces, blocks, and unsubscribes logged for that domain. In other words, all bounces, blocks, and unsubscribes will still be sent to example.com as if they were sent under normal sending conditions.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.

Retrieve footer mail settings.

This function performs a GET to the /mail_settings/footer endpoint.

This endpoint allows you to retrieve your current Footer mail settings.

The Footer setting will insert a custom footer at the bottom of your text and HTML email message bodies.

You can insert your HTML or plain text directly using the “Update footer mail settings” endpoint, or you can create the footer using the Mail Settings menu in the Twilio SendGrid App.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.

Update footer mail settings.

This function performs a PATCH to the /mail_settings/footer endpoint.

This endpoint allows you to update your current Footer mail settings.

The Footer setting will insert a custom footer at the bottom of your text and HTML email message bodies.

You can insert your HTML or plain text directly using this endpoint, or you can create the footer using the Mail Settings menu in the Twilio SendGrid App.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.
source

pub async fn get_mail_settings_forward_spam( &self ) -> Result<Response<MailSettingsForwardSpam>, ClientError>

Retrieve forward spam mail settings.

This function performs a GET to the /mail_settings/forward_spam endpoint.

This endpoint allows you to retrieve your current Forward Spam mail settings.

Enabling the Forward Spam setting allows you to specify email addresses to which spam reports will be forwarded. This endpoint returns any email address(es) you have set to receive forwarded spam and an enabled status indicating if the setting is active.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.
source

pub async fn patch_mail_settings_forward_spam( &self, body: &MailSettingsForwardSpam ) -> Result<Response<MailSettingsForwardSpam>, ClientError>

Update forward spam mail settings.

This function performs a PATCH to the /mail_settings/forward_spam endpoint.

This endpoint allows you to update your current Forward Spam mail settings.

Enabling the Forward Spam setting allows you to specify email addresses to which spam reports will be forwarded. You can set multiple addresses by passing this endpoint a comma separated list of emails in a single string.

{
  "email": "address1@example.com, address2@exapmle.com",
  "enabled": true
}

The Forward Spam setting may also be used to receive emails sent to abuse@ and postmaster@ role addresses if you have authenticated your domain.

For example, if you authenticated example.com as your root domain and set a custom return path of sub for that domain, you could turn on Forward Spam, and any emails sent to abuse@sub.example.com or postmaster@sub.example.com would be forwarded to the email address you entered in the email field.

You can authenticate your domain using the “Authenticate a domain” endpoint or in the Sender Authentication section of the Twilio SendGrid App. You can also configure the Forward Spam mail settings in the Mail Settings section of the Twilio SendGrid App.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.
source

pub async fn get_mail_settings_template( &self ) -> Result<Response<MailSettingsTemplate>, ClientError>

Retrieve legacy template mail settings.

This function performs a GET to the /mail_settings/template endpoint.

This endpoint allows you to retrieve your current legacy email template settings.

This setting refers to our original email templates. We currently support more fully featured Dynamic Transactional Templates.

The legacy email template setting wraps an HTML template around your email content. This can be useful for sending out marketing email and/or other HTML formatted messages. For instructions on using legacy templates, see how to “Create and Edit Legacy Transactional Templates. For help migrating to our current template system, see “Migrating from Legacy Templates”.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.
source

pub async fn patch_mail_settings_template( &self, body: &PatchMailSettingsTemplateRequest ) -> Result<Response<PatchMailSettingsTemplateResponse>, ClientError>

Update template mail settings.

This function performs a PATCH to the /mail_settings/template endpoint.

This endpoint allows you to update your current legacy email template settings.

This setting refers to our original email templates. We currently support more fully featured Dynamic Transactional Templates.

The legacy email template setting wraps an HTML template around your email content. This can be useful for sending out marketing email and/or other HTML formatted messages. For instructions on using legacy templates, see how to “Create and Edit Legacy Transactional Templates. For help migrating to our current template system, see “Migrating from Legacy Templates”.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.
source

pub async fn get_mail_settings_bounce_purge( &self ) -> Result<Response<MailSettingsBouncePurge>, ClientError>

Retrieve bounce purge mail settings.

This function performs a GET to the /mail_settings/bounce_purge endpoint.

This endpoint allows you to retrieve your current bounce and purge settings.

The Bounce Perge setting allows you to set a schedule that Twilio SendGrid will use to automatically delete contacts from your soft and hard bounce suppression lists.

A hard bounce occurs when an email message has been returned to the sender because the recipient’s address is invalid. A hard bounce might occur because the domain name doesn’t exist or because the recipient is unknown.

A soft bounce occurs when an email message reaches the recipient’s mail server but is bounced back undelivered before it actually reaches the recipient. A soft bounce might occur because the recipient’s inbox is full.

You can also manage this setting in the Mail Settings section of the Twilio SendGrid App. You can manage your bounces manually using the Bounces API or the Bounces menu in the Twilio SendGrid App.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.
source

pub async fn patch_mail_settings_bounce_purge( &self, body: &MailSettingsBouncePurge ) -> Result<Response<MailSettingsBouncePurge>, ClientError>

Update bounce purge mail settings.

This function performs a PATCH to the /mail_settings/bounce_purge endpoint.

This endpoint allows you to update your current bounce and purge settings.

The Bounce Perge setting allows you to set a schedule that Twilio SendGrid will use to automatically delete contacts from your soft and hard bounce suppression lists. The schedule is set in full days by assigning the number of days, an integer, to the soft_bounces and/or hard_bounces fields.

A hard bounce occurs when an email message has been returned to the sender because the recipient’s address is invalid. A hard bounce might occur because the domain name doesn’t exist or because the recipient is unknown.

A soft bounce occurs when an email message reaches the recipient’s mail server but is bounced back undelivered before it actually reaches the recipient. A soft bounce might occur because the recipient’s inbox is full.

You can also manage this setting in the Mail Settings section of the Twilio SendGrid App. You can manage your bounces manually using the Bounces API or the Bounces menu in the Twilio SendGrid App.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.
source

pub async fn get_mail_settings_forward_bounce( &self ) -> Result<Response<MailSettingsForwardBounce>, ClientError>

Retrieve forward bounce mail settings.

This function performs a GET to the /mail_settings/forward_bounce endpoint.

This endpoint allows you to retrieve your current bounce forwarding mail settings.

Enabling the Forward Bounce setting allows you to specify email addresses to which bounce reports will be forwarded. This endpoint returns the email address you have set to receive forwarded bounces and an enabled status indicating if the setting is active.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.
source

pub async fn patch_mail_settings_forward_bounce( &self, body: &MailSettingsForwardBounce ) -> Result<Response<MailSettingsForwardBounce>, ClientError>

Update forward bounce mail settings.

This function performs a PATCH to the /mail_settings/forward_bounce endpoint.

This endpoint allows you to update your current bounce forwarding mail settings.

Enabling the Forward Bounce setting allows you to specify an email address to which bounce reports will be forwarded.

You can also configure the Forward Spam mail settings in the Mail Settings section of the Twilio SendGrid App.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more