質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.47%
Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Ruby on Rails 4

Ruby on Rails4はRubyによって書かれたオープンソースのウェブフレームワークです。 Ruby on Railsは「設定より規約」の原則に従っており、効率的に作業を行うために再開発を行う必要をなくしてくれます。

メール

メールは、コンピュータネットワークを利用し、 情報等を交換する手段のことです。

AWS(Amazon Web Services)

Amazon Web Services (AWS)は、仮想空間を機軸とした、クラスター状のコンピュータ・ネットワーク・データベース・ストーレッジ・サポートツールをAWSというインフラから提供する商用サービスです。

Q&A

0回答

705閲覧

aws sesを利用して、メールを送信することができない状態にあります。

avicii

総合スコア49

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Ruby on Rails 4

Ruby on Rails4はRubyによって書かれたオープンソースのウェブフレームワークです。 Ruby on Railsは「設定より規約」の原則に従っており、効率的に作業を行うために再開発を行う必要をなくしてくれます。

メール

メールは、コンピュータネットワークを利用し、 情報等を交換する手段のことです。

AWS(Amazon Web Services)

Amazon Web Services (AWS)は、仮想空間を機軸とした、クラスター状のコンピュータ・ネットワーク・データベース・ストーレッジ・サポートツールをAWSというインフラから提供する商用サービスです。

0グッド

0クリップ

投稿2020/09/26 07:05

編集2020/09/27 04:27

現在、AWSのSESを利用して、お問い合わせメールを送信しようと考えているのですが、awsのSES上のSend a Test Emailからだと送信がされるのですが、サイト上で送信しようとすると、メールが送れない状態にあります。(エラーにはなっていないのですが)
もしわかる方がいらしたら、どうか教えて頂きたいです。

イメージ説明
イメージ説明
イメージ説明

送信ができていない状況にあります
・sending statisticsの件数が増えていません。

console

1I, [2020-09-26T06:51:11.967091 #15083] INFO -- : Rendered customer/confirm.html.erb (14.0ms) 2I, [2020-09-26T06:51:11.967415 #15083] INFO -- : Completed 200 OK in 17ms (Views: 10.8ms | ActiveRecord: 5.8ms) 3I, [2020-09-26T06:51:14.958815 #15081] INFO -- : Started POST "/customer/thanks" for 106.180.1.11 at 2020-09-26 06:51:14 +0000 4I, [2020-09-26T06:51:14.962917 #15081] INFO -- : Processing by CustomerController#thanks as HTML 5I, [2020-09-26T06:51:14.963099 #15081] INFO -- : Parameters: {"utf8"=>"✓", "authenticity_token"=>"GQY4sBOUcWY7Yus23XMd3a1756M9JXYHDXt5MDlVvX+0riBB/oKuzj6MFSemvFhk4W9m/KKu95FNtp49eUXKRg==", "customer"=>{"name"=>"xxxxxxxxx", "email"=>"xxxxxxxxxxx@gmail.com", "about"=>"要件について", "message"=>"Hello"}, "commit"=>"送信する"} 6I, [2020-09-26T06:51:14.978318 #15081] INFO -- : Rendered customer_mailer/received_email.html.erb within layouts/mailer (0.5ms) 7I, [2020-09-26T06:51:14.980623 #15081] INFO -- : Rendered customer_mailer/received_email.text.erb within layouts/mailer (0.4ms) 8D, [2020-09-26T06:51:15.280900 #15081] DEBUG -- : 9CustomerMailer#received_email: processed outbound mail in 312.9ms 10I, [2020-09-26T06:51:15.303467 #15081] INFO -- : 11Sent mail to xxxxxxxxxxxx@gmail.com (22.2ms) 12D, [2020-09-26T06:51:15.303657 #15081] DEBUG -- : Date: Sat, 26 Sep 2020 06:51:15 +0000 13From: info <xxxxxxxxxxxx@wa-campus.com> 14To: info <xxxxxxxxxxx@gmail.com> 15Message-ID: <5f6ee4e346151_3ae91221c0c595dd@ip-10-0-0-42.mail> 16Subject: =?UTF-8?Q?=E3=81=8A=E5=95=8F=E3=81=84=E5=90=88=E3=82=8F=E3=81=9B=E3=82=92=E6=89=BF=E3=82=8A=E3=81=BE=E3=81=97=E3=81=9F?= 17Mime-Version: 1.0 18Content-Type: multipart/alternative; 19 boundary="--==_mimepart_5f6ee4e344362_3ae91221c0c594e6"; 20 charset=UTF-8 21Content-Transfer-Encoding: 7bit 22 23 24----==_mimepart_5f6ee4e344362_3ae91221c0c594e6 25Content-Type: text/plain; 26 charset=UTF-8 27Content-Transfer-Encoding: base64 28 29V2Vi44K144Kk44OI44GL44KJ44GK5ZWP44GE5ZCI44KP44Gb44GM44GC44KK 3044G+44GX44Gf44CCDQogDQotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0K 31TmFtZTog55+z5rih5oi444CA57SYDQpFbWFpbDogaG9uZGE3NzA4MTBAZ21h 32aWwuY29tDQpTdWJqZWN0OiDopoHku7bjgavjgaTjgYTjgaYNCk1lc3NhZ2U6 33DQpIZWxsbw0KDQotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KDQo= 34 35----==_mimepart_5f6ee4e344362_3ae91221c0c594e6 36Content-Type: text/html; 37 charset=UTF-8 38Content-Transfer-Encoding: quoted-printable 39 40<html>=0D 41 <body>=0D 42 <!doctype html>=0D 43<html lang=3D"ja">=0D 44 <head>=0D 45 <meta content=3D"text/html; charset=3DUTF-8" />=0D 46 </head>=0D 47 <body>=0D 48 <p>Name: =E7=9F=B3=E6=B8=A1=E6=88=B8=E3=80=80=E7=B4=98</p>=0D 49 <p>Email: xxxxxxxxxxxx@gmail.com</p>=0D 50 <p>Subject: =E8=A6=81=E4=BB=B6=E3=81=AB=E3=81=A4=E3=81=84=E3=81=A6</p>= 51=0D 52 <p>Message: Hello</p>=0D 53 <hr />=0D 54 </body>=0D 55</html>=0D 56=0D 57 </body>=0D 58</html>=0D 59 60----==_mimepart_5f6ee4e344362_3ae91221c0c594e6-- 61 62 63```Gemfile 64gem 'aws-ses', '~> 0.6'
/mailers/customer_mailer ```mailer class CustomerMailer < ApplicationMailer default from: "info <xxxxxxxxxx@xxxxxxxxxxx.com>" # 送信元アドレス layout 'mailer' def received_email(customer) @customer = customer mail( to: 'info <xxxxxxxxxxx@gmail.com>', subject: 'お問い合わせを承りました' ) end end

/environments/production.rb

production

1config.action_mailer.raise_delivery_errors = false 2 config.mailer_sender = 'Info <xxxxxxxxxxxxxx@xxxxxxxx.com>' 3 config.action_mailer.default_url_options = { host: 'xxxxxxxxx.com' } 4 config.action_mailer.delivery_method = :ses 5 config.action_mailer.smtp_settings = { 6 7 :server => 'email-smtp.ap-northeast-1.amazonaws.com', 8 :port => 587, 9 :access_key_id => 'xxxxxxxxxxxxxxx', 10 :secret_access_key => 'xxxxxxxxxxxxxxxxxxxxxxxx', 11 :domain => 'xxxxxx.com', 12 :enable_starttls_auto => true 13 }

/initializers/aws.rb

aws

1config.action_mailer.raise_delivery_errors = false 2 config.mailer_sender = 'Info <xxxxxxxxxxx@xxxxxxxxx.com>' 3 config.action_mailer.default_url_options = { host: 'xxxxxx.com' } 4 config.action_mailer.delivery_method = :ses 5 config.action_mailer.smtp_settings = { 6 7 :server => 'email-smtp.ap-northeast-1.amazonaws.com', 8 :port => 587, 9 :access_key_id => 'xxxxxxxxxxxxx', 10 :secret_access_key => 'xxxxxxxxxxxxxxxxxxxxx', 11 :domain => 'xxxxxxxxxx.com', 12 :enable_starttls_auto => true 13 }

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

yu_1985

2020/09/26 15:54

SESのコンソールのsending statisticsで24時間以内に送信された件数を確認できますが、そこの件数は増えてますか? また、「送れていない」とは何をもとに判断しましたか? 「受信していない」と「送れていない」は少し違います。 上記のsending statisticsで件数が増えていなければ、少なくともSESでの送信はできていないことがわかります。 増えているのであれば、送信後どこかで未到達の原因があることになります。
avicii

2020/09/27 04:25

sending statisticsの件数が増えていない状態にあります。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.47%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問