无法让mailchimp API工作

时间:2012-10-24 18:26:42

标签: php mailchimp

我把头发拉过这个!

在我文件的最顶部,我有include(CHILD_DIR . '/lib/global_var.php');,其中包含大量标准变量,包括$MC_API$MC_LID,它们是API和列表ID的用户输入值

然后我有一些验证

if(($threshRate > $threshold || $threshRate == $threshold) && $error == false){
    //Do all this crazy stuff and now do mailchimp
    //MAIL CHIMP!
    require_once (CHILD_DIR.'/modules/MCAPI.class.php');
    $api = new MCAPI($MC_API);

    // By default this sends a confirmation email - you will not see new members
    // until the link contained in it is clicked!
    $retval = $api->listSubscribe( $MC_LID, $_POST['email'] );

    if ($api->errorCode){
        echo "Unable to load listSubscribe()!\n";
        echo "\tCode=".$api->errorCode."\n";
        echo "\tMsg=".$api->errorMessage."\n";
    } else {
        echo "Subscribed - look for the confirmation email!\n";
    }
}

它只是给我一个白色的空白区域,这个代码所在的位置,我从未看到来自Mail Chimp的电子邮件。

:(

0 个答案:

没有答案