AWS-SDKおよびsendRawEmail()
を使用してAmazon SESを使用してメールを送信しています。 しかし、ヘッダーには「From」というエラーが表示されています。AWS-SES電子メールAPI(AWS-SDKをPHPで使用)のヘッダーがありません
コードは以下のようにある:私は「ソース」を与えていない場合は、sendRawEmail()
で「目的地」は、それはヘッダが、それらのパラメータが与えられている欠落している場合は、「から」エラーを与える
$header .= "From: [email protected] \r\n ";
$header .= "To: [email protected] \r\n ";
$header .= "Reply-To: [email protected] \r\n ";
$header .= "Subject: Testing Attachments \r\n ";
$header .= "MIME-Version: 1.0 \r\n ";
$header .= "Content-Type: text/plain; charset=utf-8 \r\n ";
$header .= "Content-Transfer-Encoding: 7bit \r\n \r\n ";
$header .= "This is normal content \r\n ";
$result = $client->sendRawEmail(
array('RawMessage' => array('Data' => base64_encode($header)), 'Source' => '[email protected]', 'Destinations' => array('[email protected]'), 'SourceArn' => 'arn:aws:ses:eu-west-1:1234:identity/[email protected]', 'FromArn' => 'arn:aws:ses:eu-west-1:1234:identity/[email protected]')
);
こと同じエラーでメールがバウンスします。
同じソリューションを見つけるのを手伝ってくれてありがとうございます。
おそらく関係はありませんが、それぞれの\ r \ nの前には**スペース文字はありません。間違いなく、メッセージの終わりには誰もいないはずです。 –