1
我正在使用郵件黑猩猩api發送郵件給我的網站中的用戶。當我運行我的代碼時顯示錯誤消息 {"aws_type":null,"aws_code":null,"http_code":500,"message":"Please setup the integration first"}
。集成郵件黑猩猩電子郵件功能
我用這個代碼
$apikey = 'api_key';
$to_emails = array('[email protected]');
$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'=>'[email protected]',
'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";
沒有任何整合this.If以前做過任何一個知道請回復
對我來說,似乎你錯過了在此之前的一些設置步驟。我建議您從這裏閱讀,並確保您完成了所有步驟http://apidocs.mailchimp.com/gettingstarted/connectivity.php – pal4life 2012-08-22 17:11:37