You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You will have to ensure that you provide credentials for the SDK to use. See the
latest AWS SDK for Ruby Docs
for details.
If you're running your Rails application on Amazon EC2, the AWS SDK will
check Amazon EC2 instance metadata for credentials to load. Learn more:
IAM Roles for Amazon EC2
Usage
To use these mailers as a delivery method, you need to set the delivery method
and configure the delivery method with the appropriate settings. For example,
to configure ActionMailer to use the Amazon SESV2 API in the us-west-2
region, you can add the following to an environment file in your Rails
application:
# config/environments/production.rbRails.application.configuredo |config|
...
# Use the Amazon SESV2 API in the us-west-2 regionconfig.action_mailer.delivery_method=:ses_v2config.action_mailer.ses_v2_settings={region: 'us-west-2'}
...
end
Using ARNs with SES
This gem uses `Aws::SES::Client#send_raw_email`
and `Aws::SESV2::Client#send_email`
to send emails. These operations allows you to specify a cross-account identity
for the email's Source, From, and Return-Path. To set these ARNs, use any of the
following headers on your Mail::Message object returned by your Mailer class:
X-SES-SOURCE-ARN
X-SES-FROM-ARN
X-SES-RETURN-PATH-ARN
Example:
# in your Rails controllermessage=MyMailer.send_email(options)message['X-SES-FROM-ARN']='arn:aws:ses:us-west-2:012345678910:identity/bigchungus@memes.com'message.deliver