Newer Version Available

This content describes an older version of this product. View Latest

EmailRelay

Represents the configuration for sending an email relay. An email relay routes email sent from Salesforce through your company’s email servers. This object is available in API version 43.0 and later.

Supported Calls

create()delete()describeSObjects()query()retrieve()update()upsert()

Special Access Rules

You must have the “Email Administration,” “Customize Application,” and “View Setup” user permissions to use this object.

The multiple email relay setting in Setup must be enabled, before you can use this API. From Setup, enter Email Relay Activation, select Email Relay Activation, and then select Try it now! .

Fields

Field Name Details
Host
Type
string
Properties
Create, Filter, Group, Sort, Update
Description

Indicates the host name or IP address of your company's SMTP server.

IsRequireAuth
Type
boolean
Properties
Create, Defaulted on create, Filter, Group, Sort
Description

Indicates whether (true) or not (false) authentication is required. When setting this field to true, the TlsSetting must be set to RequiredVerify. This field is available in API version 44.0 and later.

Password
Type
encryptedstring
Properties
Create, Nillable, Update
Description

Specifies the password for relay host STMP authentication. When IsRequireAuth is set to true, this field is required. This field is available in API version 44.0 and later.

Port
Type
picklist
Properties
Create, Filter, Group, Restricted picklist, Sort, Update
Description

Indicates the port number of your company's SMTP server.

  • 25
  • 587
  • 10025
  • 11025
TlsSetting
Type
picklist
Properties
Create, Filter, Group, Restricted picklist, Sort, Update
Description

Specifies whether Salesforce uses TLS for SMTP sessions.

  • Off: TLS is turned off. SMTP session continues through an insecure connection.
  • Preferred: If the remote server supports TLS, Salesforce upgrades the current SMTP session to use TLS. If TLS is unavailable, Salesforce continues the session without TLS.
  • Required: Salesforce continues the session only if the remote server supports TLS. If TLS is unavailable, Salesforce terminates the session without delivering the email.
  • PreferredVerify: If the remote server supports TLS, Salesforce upgrades the current SMTP session to use TLS. Before the session begins, Salesforce verifies that the certificate is signed by a valid certificate authority, and that the common name presented in the certificate matches the domain or mail exchange of the current connection. If TLS is available but the certificate is not signed or the common name does not match, Salesforce disconnects the session and does not deliver the email. If TLS is unavailable, Salesforce continues the session without TLS.
  • RequiredVerify: Salesforce continues the session only if the remote server supports TLS, the certificate is signed by a valid certificate authority, and the common name presented in the certificate matches the domain or mail exchange to which Salesforce is connected. If any of these criteria are not met, Salesforce terminates the session without delivering the email.
Username
Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description

Specifies the username for relay host STMP authentication. When IsRequireAuth is set to true, this field is required. This field is available in API version 44.0 and later.

Usage

An email relay must be associated with an active EmailDomainFilter to take effect.

Keep in mind that if you also plan to activate Bounce Management and Email Compliance Management, confirm with your email admin that your company allows relaying email sent from Salesforce. For more information on bounce management, see Configure Deliverability Settings for Emails Sent from Salesforce.

Tip