2016-12-14 28 views
1

私は電子メールを送信するのにmailgunを使用していますが、以下のコードを複製して 'to'変数を追加するとメールを送信できません。 cc。私は、コードから 'CC' を削除した場合、すべてが正常に動作し、それは誤り下に貼り付けスローoherwise:Mailgunはccに電子メールを送信できません

$result = $mgClient->sendMessage($domain, array(
    'from' => 'Me <[email protected]>', 
    'to'  => $_POST["customer"]["email"]), 
    'cc'  => '[email protected]', 
    'subject' => 'Confirmation – domain.com', 
    'html' => $text 
)); 

エラー:

Fatal error: Uncaught Mailgun\Connection\Exceptions\MissingRequiredParameters: The parameters passed to the API were invalid. Check your inputs! The domain is unverified and requires DNS configuration. Log in to your control panel to view required DNS records.

+1

'$ _POST [ "顧客"] [ "電子メール"]'それは疑問だが読んでため

。その価値は何ですか? –

+0

「cc」という行をコメントすると問題はありません – user3216673

+0

投稿されたエラーを見て、サーバー/ドメインに関連する問題である可能性があります。 –

答えて

0

をあなたのコードに問題はありません。 未確認のドメイン名のエラーです。 domain.comをドメインとして使用した場合は、このドメイン名が有効であることを確認してください。よりthis

関連する問題