Amazon SESを利用して自分のドメインからPHPでメールを送信できるようにしたいとおもっています。
ドメインはムームドメインで管理しております。
Amazon SESでは
Domain Identities
Verification Status
DKIM Status
Enabled for Sending
これらはVerifyとなっております。
Amazonより提供されてる
1.TXT Name
2.DKIMでCNAMEを3つ
ムームドメインの管理画面より設定しました。
設定して2日ほど立ちましたので、テストメールを送信しましたが。
PHPの送信の設定は以下になります。
$config_email=[ 'smtp_crypto' => 'tls', "protocol" =>"smtp", "smtp_host" => "秘密", "smtp_port"=>587, "smtp_user"=>'秘密', "smtp_pass"=>"秘密", 'crlf' => "\r\n", 'newline' => "\r\n" ]; ```--- Codeigniter4 を利用しており 以下の関数で送信をしています。 ```ここに言語を入力 public function Send($send_email,$subject,$message){ $email = \Config\Services::email(); //amazon sesの設定情報が入ります。 $email->initialize($config_email); $email->setFrom($this->my_email, $this->my_email_name_ja); $email->setTo($send_email); $email->setReplyTo($this->my_email); $email->setSubject($subject); $email->setMessage($message); print $send_email; $email->send(); $data = $email->printDebugger(); print_r($data); }
以下のエラーがでてきます。
You did not specify a SMTP hostname.
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
ムームドメインの設定は関係ないのでしょうか?
回答2件
あなたの回答
tips
プレビュー