1

メール チンプ API を使用して、Web サイトのユーザーにメールを送信しています。コードを実行すると、エラー メッセージが {"aws_type":null,"aws_code":null,"http_code":500,"message":"Please setup the integration first"}表示されます。

私はこのコードを使用します

 $apikey = 'api_key';

$to_emails = array('rohith038@gmail.com');
$to_names = array('You', 'Your Mom');

$message = array(
    'html'=>'Yo, this is the <b>html</b> portion',
    'text'=>'Yo, this is the *text* portion',
    'subject'=>'This is the subject',
    'from_name'=>'Me!',
    'from_email'=>'verifed@example.com',
    'to_email'=>$to_emails,
    'to_name'=>$to_names
);

$tags = array('WelcomeEmail');

$params = array(
    'apikey'=>$apikey,
    'message'=>$message,
    'track_opens'=>true,
    'track_clicks'=>false,
    'tags'=>$tags
);

$url = "http://us1.sts.mailchimp.com/1.0/SendEmail";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url.'?'.http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec($ch);
echo $result;
curl_close ($ch);

$data = json_decode($result);
echo "Status = ".$data->status."\n";

この前に行うべき統合はありますか。誰かが知っている場合は返信してください

4

1 に答える 1

0

Amazon STS を使用しているようです。したがって、この投稿で言及されているように、最初に Amazon のサービスとの統合手順を完了する必要があります。

http://apidocs.mailchimp.com/sts/

https://groups.google.com/forum/#!topic/mailchimp-api-discuss/JvSxQDQfIq4/discussion

于 2012-08-22T17:17:58.160 に答える