View Source ExAws.SES (ExAws.SES v2.4.1)
Operations on AWS SES.
See https://docs.aws.amazon.com/ses/latest/APIReference/Welcome.html
Link to this section Summary
Functions
Build message object.
Create a new contact in a contact list.
Create a contact list via the SES V2 API, see (https://docs.aws.amazon.com/ses/latest/APIReference-V2/).
Create a custom verification email template.
Create a bulk import job to import contacts from S3.
Creates an email template.
Delete a contact in a contact list.
Delete contact list.
Delete custom verification email template.
Deletes the specified identity (an email address or a domain) from the list of verified identities.
Delete an email address from list of suppressed destinations.
Deletes an email template.
Show a contact in a contact list.
Show contact list.
Fetch identities verification status and token (for domains).
Get email template
Fetch configuration sets associated with AWS account.
List contact lists.
Show contacts in contact list.
Lists custom verification email templates.
List identities associated with the AWS account
List email templates.
Add an email address to list of suppressed destinations. A suppression reason
is mandatory (see t:suppression_reason()
).
Send a templated email to multiple destinations.
Send a verification email using a custom template.
Composes an email message.
Send an email via the SES V2 API, which supports list management.
Send a raw Email.
Send a templated Email.
Enables or disables whether Amazon SES forwards notifications as email.
Set whether SNS notifications should include original email headers or not.
Sets the Amazon Simple Notification Service (Amazon SNS) topic to which Amazon SES will publish delivery notifications for emails sent with given identity.
Update a contact in a contact list.
Update a contact list. Only accepts description and topic updates.
Update or create a custom verification email template.
Updates an email template.
Verifies an email address.
Link to this section Types
Specs
bulk_destination() :: [ %{destination: destination(), replacement_template_data: binary()} ]
Specs
Specs
contact_opt() :: {:attributes, String.t()} | {:topic_preferences, [topic_preference()]} | {:unsubscribe_all, Boolean.t()}
Specs
Specs
create_template_opt() :: {:configuration_set_name, String.t()}
Specs
destination() :: %{ to: [email_address()], cc: [email_address()], bcc: [email_address()] }
Specs
destination_v2() :: %{ optional(:ToAddresses) => [email_address()], optional(:CcAddresses) => [email_address()], optional(:BccAddresses) => [email_address()] }
Specs
email_address() :: binary()
Specs
email_content() :: %{ optional(:Raw) => %{Data: binary()}, optional(:Simple) => %{ Body: %{Html: email_field(), Text: email_field()}, Subject: email_field() }, optional(:Template) => %{ TemplateArn: String.t(), TemplateData: String.t(), TemplateName: String.t() } }
Specs
Specs
Specs
import_destination() :: %{ optional(:ContactListDestination) => contact_list_destination(), optional(:SuppressionListDestination) => suppression_list_destination() }
Specs
list_configuration_sets_opt() :: {:max_items, pos_integer()} | {:next_token, String.t()}
Specs
Specs
list_identities_opt() :: {:max_items, pos_integer()} | {:next_token, String.t()} | {:identity_type, String.t()}
Specs
list_templates_opt() :: {:max_items, pos_integer()} | {:next_token, String.t()}
Specs
Specs
Specs
notification_type() :: :bounce | :complaint | :delivery
Specs
Specs
send_custom_verification_email_opt() :: {:configuration_set_name, String.t()}
Specs
Specs
send_email_v2_opt() :: {:configuration_set_name, String.t()} | {:tags, [tag()]} | {:feedback_forwarding_address, String.t()} | {:feedback_forwarding_arn, String.t()} | {:from_arn, String.t()} | {:list_management, %{ContactListName: String.t(), TopicName: String.t()}} | {:reply_addresses, [String.t()]}
Specs
Specs
Specs
set_identity_notification_topic_opt() :: {:sns_topic, binary()}
Specs
suppression_list_destination() :: %{SuppressionListImportAction: String.t()}
Specs
suppression_reason() :: :BOUNCE | :COMPLAINT
Specs
Specs
Specs
Specs
Specs
Specs
update_template_opt() :: {:configuration_set_name, String.t()}
Link to this section Functions
Specs
Build message object.
Specs
create_contact(String.t(), email_address(), [contact_opt()]) :: ExAws.Operation.JSON.t()
Create a new contact in a contact list.
Options:
:attributes
- arbitrary string to be assigned to AWS SES Contact AttributesData:topic_preferences
- list of maps for subscriptions to topics. SubscriptionStatus should be one of "OPT_IN" or "OPT_OUT":unsubscribe_all
- causes contact to be unsubscribed from all topics
Specs
create_contact_list(String.t(), opts :: [create_contact_list_opt()]) :: ExAws.Operation.JSON.t()
Create a contact list via the SES V2 API, see (https://docs.aws.amazon.com/ses/latest/APIReference-V2/).
examples
Examples
ExAws.SES.create_contact_list(
"Test list",
"Test description",
tags: [%{"Key" => "environment", "Value" => "test"}],
topics: [
%{
"TopicName": "test_topic"
"DisplayName": "Test topic",
"Description": "Test discription",
"DefaultSubscriptionStatus": "OPT_IN",
}
]
)
create_custom_verification_email_template(template_name, from_email_address, template_subject, template_content, success_redirection_url, failure_redirection_url)
View SourceSpecs
create_custom_verification_email_template( String.t(), String.t(), String.t(), String.t(), String.t(), String.t() ) :: ExAws.Operation.Query.t()
Create a custom verification email template.
Specs
create_import_job(import_data_source(), import_destination()) :: ExAws.Operation.JSON.t()
Create a bulk import job to import contacts from S3.
Params:
:import_data_source
:import_destination
- requires either aContactListDestination
orSuppressionListDestination
map.
Specs
create_template( String.t(), String.t(), String.t(), String.t(), opts :: [create_template_opt()] ) :: ExAws.Operation.Query.t()
Creates an email template.
Specs
delete_contact(String.t(), email_address()) :: ExAws.Operation.JSON.t()
Delete a contact in a contact list.
Specs
delete_contact_list(String.t()) :: ExAws.Operation.JSON.t()
Delete contact list.
Specs
delete_custom_verification_email_template(String.t()) :: ExAws.Operation.Query.t()
Delete custom verification email template.
Specs
delete_identity(binary()) :: ExAws.Operation.Query.t()
Deletes the specified identity (an email address or a domain) from the list of verified identities.
Specs
delete_suppressed_destination(String.t()) :: ExAws.Operation.JSON.t()
Delete an email address from list of suppressed destinations.
Specs
delete_template(binary()) :: ExAws.Operation.Query.t()
Deletes an email template.
Specs
get_contact(String.t(), email_address()) :: ExAws.Operation.JSON.t()
Show a contact in a contact list.
Specs
get_contact_list(String.t()) :: ExAws.Operation.JSON.t()
Show contact list.
Specs
get_identity_verification_attributes([binary()]) :: ExAws.Operation.Query.t()
Fetch identities verification status and token (for domains).
Specs
get_template(String.t()) :: ExAws.Operation.Query.t()
Get email template
Specs
list_configuration_sets(opts :: [] | [list_configuration_sets_opt()]) :: ExAws.Operation.Query.t()
Fetch configuration sets associated with AWS account.
Specs
list_contact_lists() :: ExAws.Operation.JSON.t()
List contact lists.
The API accepts pagination parameters, but they're redundant as AWS limits usage to a single list per account.
Specs
list_contacts(String.t()) :: ExAws.Operation.JSON.t()
Show contacts in contact list.
Specs
list_custom_verification_email_templates( opts :: [list_custom_verification_email_templates_opt()] | [] ) :: ExAws.Operation.Query.t()
Lists custom verification email templates.
Specs
list_identities(opts :: [] | [list_identities_opt()]) :: ExAws.Operation.Query.t()
List identities associated with the AWS account
Specs
list_templates(opts :: [] | [list_templates_opt()]) :: ExAws.Operation.Query.t()
List email templates.
Specs
put_suppressed_destination(String.t(), SuppressionReason.t()) :: ExAws.Operation.JSON.t()
Add an email address to list of suppressed destinations. A suppression reason
is mandatory (see t:suppression_reason()
).
send_bulk_templated_email(template, source, destinations, opts \\ [])
View SourceSpecs
send_bulk_templated_email( template :: binary(), source :: binary(), destinations :: bulk_destination(), opts :: [send_bulk_templated_email_opt()] ) :: ExAws.Operation.Query.t()
Send a templated email to multiple destinations.
send_custom_verification_email(email_address, template_name, opts \\ [])
View SourceSpecs
send_custom_verification_email( String.t(), String.t(), opts :: [send_custom_verification_email_opt()] | [] ) :: ExAws.Operation.Query.t()
Send a verification email using a custom template.
Specs
send_email( dst :: destination(), msg :: message(), src :: binary(), opts :: [send_email_opt()] ) :: ExAws.Operation.Query.t()
Composes an email message.
Send an email via the SES V2 API, which supports list management.
:content
should include one of a Raw
, Simple
, or Template
key.
Specs
send_raw_email(binary(), opts :: [send_raw_email_opt()]) :: ExAws.Operation.Query.t()
Send a raw Email.
send_templated_email(dst, src, template, template_data, opts \\ [])
View SourceSpecs
send_templated_email( dst :: destination(), src :: binary(), template :: binary(), template_data :: binary(), opts :: [send_templated_email_opt()] ) :: ExAws.Operation.Query.t()
Send a templated Email.
Specs
set_identity_feedback_forwarding_enabled(boolean(), binary()) :: ExAws.Operation.Query.t()
Enables or disables whether Amazon SES forwards notifications as email.
set_identity_headers_in_notifications_enabled(identity, type, enabled)
View SourceSpecs
set_identity_headers_in_notifications_enabled( binary(), notification_type(), boolean() ) :: ExAws.Operation.Query.t()
Set whether SNS notifications should include original email headers or not.
Specs
set_identity_notification_topic( binary(), notification_type(), set_identity_notification_topic_opt() | [] ) :: ExAws.Operation.Query.t()
Sets the Amazon Simple Notification Service (Amazon SNS) topic to which Amazon SES will publish delivery notifications for emails sent with given identity.
Absent :sns_topic
options cleans SnsTopic and disables publishing.
Notification type can be on of the :bounce
, :complaint
, or :delivery
.
Requests are throttled to one per second.
Specs
update_contact(String.t(), email_address(), [contact_opt()]) :: ExAws.Operation.JSON.t()
Update a contact in a contact list.
Specs
update_contact_list(String.t(), opts :: [update_contact_list_opt()]) :: ExAws.Operation.JSON.t()
Update a contact list. Only accepts description and topic updates.
examples
Examples
ExAws.SES.update_contact_list("test_list", description: "New description")
Specs
update_custom_verification_email_template( opts :: [update_custom_verification_email_template_opt()] | [] ) :: ExAws.Operation.Query.t()
Update or create a custom verification email template.
Specs
update_template( String.t(), String.t(), String.t(), String.t(), opts :: [update_template_opt()] ) :: ExAws.Operation.Query.t()
Updates an email template.
Specs
verify_email_identity(email :: binary()) :: ExAws.Operation.Query.t()
Verifies an email address.