Protected
configurationOptional
initOverrides: InitOverrideRetrieve email provider details. A list of fields to include or exclude may also be specified.
Get the email provider
Optional
initOverrides: InitOverrideProtected
requestOptional
initOverrides: RequestInit | InitOverrideFunctionUpdate an email provider.
The credentials
object requires different properties depending on the email provider (which is specified using the name
property):
mandrill
requires api_key
sendgrid
requires api_key
sparkpost
requires api_key
. Optionally, set region
to eu
to use the SparkPost service hosted in Western Europe; set to null
to use the SparkPost service hosted in North America. eu
or null
are the only valid values for region
.mailgun
requires api_key
and domain
. Optionally, set region
to eu
to use the Mailgun service hosted in Europe; set to null
otherwise. eu
or null
are the only valid values for region
.ses
requires accessKeyId
, secretAccessKey
, and region
smtp
requires smtp_host
, smtp_port
, smtp_user
, and smtp_pass
settings
object with different configuration options, which will be used when sending an email:
smtp
provider, settings
may contain headers
object. When using AWS SES SMTP host, you may provide a name of configuration set in X-SES-Configuration-Set
header. Value must be a string.ses
provider, settings
may contain message
object, where you can provide a name of configuration set in configuration_set_name
property. Value must be a string.Update the email provider
Optional
initOverrides: InitOverride
Create an email provider. The
credentials
object requires different properties depending on the email provider (which is specified using thename
property):
Depending on the type of provider it is possible to specifymandrill
requiresapi_key
sendgrid
requiresapi_key
sparkpost
requiresapi_key
. Optionally, setregion
toeu
to use the SparkPost service hosted in Western Europe; set tonull
to use the SparkPost service hosted in North America.eu
ornull
are the only valid values forregion
.mailgun
requiresapi_key
anddomain
. Optionally, setregion
toeu
to use the Mailgun service hosted in Europe; set tonull
otherwise.eu
ornull
are the only valid values forregion
.ses
requiresaccessKeyId
,secretAccessKey
, andregion
smtp
requiressmtp_host
,smtp_port
,smtp_user
, andsmtp_pass
settings
object with different configuration options, which will be used when sending an email:smtp
provider,settings
may containheaders
object. When using AWS SES SMTP host, you may provide a name of configuration set inX-SES-Configuration-Set
header. Value must be a string.ses
provider,settings
may containmessage
object, where you can provide a name of configuration set inconfiguration_set_name
property. Value must be a string.Configure the email provider
Throws