> ## Documentation Index
> Fetch the complete documentation index at: https://auth0.generaltranslation.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Amazon SESを外部SMTPメールプロバイダーとして構成する

> Amazon Simple Email Service（SES）を外部メールプロバイダーとして構成し、メール通信の管理、追跡とトラブルシューティングを行う方法について説明します。

Auth0では独自のSMTPメールプロバイダーを構成して、メール通信をより完全に管理、監視、トラブルシューティングできるようにすることができます。Auth0に組み込みのメールインフラストラクチャは、メールのテストにのみ使用してください。

<div id="prerequisites">
  ## 前提条件
</div>

* Auth0からSMTPにメールが確実に送信されるように、ポートを開いて、特定のIPアドレスからのインバウンド接続を許可します。IPのリストを更新するには、[［Dashboard］>［Branding（ブランディング）］>［Email Provider（メールプロバイダー）］](https://manage.auth0.com/#/branding/email_provider)に移動します。詳細については、「[AllowListにIPアドレスを追加する](/docs/ja-JP/ja-jp/secure/security-guidance/data-security/allowlist)」を参照してください。
* [Amazon AWS](http://aws.amazon.com/ses/)アカウントが必要です。
* 使用する資格情報をAPIまたはSMTPから選択します。SESの資格情報については、Amazonのドキュメントで[Amazon SESで資格情報を使用する方法](http://docs.aws.amazon.com/ses/latest/DeveloperGuide/using-credentials.html)を確認してください。

<div id="configure-amazon-ses-with-api-credentials">
  ## API資格情報でAmazon SESを構成する
</div>

1. [Amazon AWS](http://aws.amazon.com/ses/)アカウントにログインします。

2. [ドメインを確認](http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-domains.html)します。

3. [メールアドレスを確認](http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-email-addresses.html)

4. [運用アクセスをリクエスト](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/request-production-access.html?icmpid=docs_ses_console)します。

5. [AWSアクセスキーを取得](http://docs.aws.amazon.com/ses/latest/DeveloperGuide/get-aws-keys.html)します。キーをコピーします。これらの値は後でAuth0に入力する必要があります。

6. [適切なアクセス許可のあるポリシーをアタッチ](http://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_manage.html)します。以下の例のように、`ses:SendRawEmail`と`ses:SendEmail`のアクセス許可があるポリシーをアタッチします。

   ```json lines theme={null}
   {
       "Version": "2012-10-17",
       "Statement": [
           {
               "Effect": "Allow",
               "Action": [
                   "ses:SendRawEmail",
                   "ses:SendEmail"
               ],
               "Resource": "*"
           }
       ]
   }
   ```

7. [［Auth0 Dashboard］>［Branding（ブランディング）］>［Email Provider（メールプロバイダー）］](https://manage.auth0.com/#/branding/email_provider)に移動します。

8. **［Use my own email provider（独自のメールプロバイダーを使用する）］** を有効にします。

9. **Amazon Web Services** ロゴをクリックします。.

10. **［From（差出人）］** のメールアドレスを入力して、AWSの **［Access Key Id（アクセスキーID）］** と **［Secret Access Key（シークレットアクセスキー）］** を入力し、 **［Region（リージョン）］** を選択します。

11. **［Save（保存）］** をクリックします。

<div id="configure-amazon-ses-with-smtp-credentials">
  ### SMTP資格情報でAmazon SESを構成する
</div>

1. [Amazon AWS](http://aws.amazon.com/ses/)アカウントにサインアップまたはログインします。
2. [ドメインを確認](http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-domains.html)します。
3. [運用アクセスをリクエスト](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/request-production-access.html?icmpid=docs_ses_console)します。
4. [SMTP認証情報を取得](http://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-credentials.html)します。セキュリティ認証情報をコピーします。これらの値は後でAuth0に入力する必要があります。
5. [［Dashboard ］>［Emails（メール）］>［Custom Email Provider（カスタムメールプロバイダー）］](https://manage.auth0.com/#/emails/provider)に移動します。
6. **［Use my own email provider（独自のメールプロバイダーを使用する）］** を有効にします。
7. **SMTP** ロゴをクリックします。
8. **［From（差出人）］** のメールアドレスを入力して、SMTPサーバーの **［Host（ホスト）］** 、 **［Port（ポート）］** 、 **［Username（ユーザー名）］** と **［Password（パスワード）］** を入力し、 **［Save（保存）］** をクリックします。`email-smtp.us-east-1.amazonaws.com`（`us-east-1`は適切なリージョンで置換）を **［Host（ホスト）］** と`587`の **ポート** の代わりに使用することができます。

<div id="test-email">
  ## メールをテストする
</div>

テストメールを送信するには、 **［Send Test Email（テストメールの送信）］** ボタンを使用します。すべてが正しく構成されていると、確認メールを受け取ります。数分経ってもメールを受信しない場合は、[Auth0ログ](https://manage.auth0.com/#/logs)でエラーを確認してください。

これで、[Amazon SESコンソール](https://console.aws.amazon.com/ses)に、ユーザーに送信されたすべてのメールの配信インサイトが表示されるようになりました。
