我正在使用Mailchimp API v2,使用适当的php包装器
需要很简单:
1 - 从现有模板创建广告系列
2 - 发送广告系列
我的问题是我不能从该API创建任何内容(称为mc:edit),尽管根据文档,这是可能的。
在Mailchimp帐户中,这是模板的一部分
<table border="0" cellpadding="10" cellspacing="0" width="600" id="templateBody">
<tr>
<td valign="top" class="bodyContent">
<!-- // Begin Module: Standard Content \\ -->
<table border="0" cellpadding="10" cellspacing="0" width="100%">
<tr>
<td valign="top">
<div mc:edit="content_tdm_body></div>
</td>
</tr>
</table>
<!-- // End Module: Standard Content \\ -->
</td>
</tr>
如您所见,我的可修改内容密钥为content_tdm_body
这是我使用的php代码:
$cid = $api->campaignCreate('regular',
array('list_id' => "xxx",
'subject' => "A campagin test",
'from_email' => "x@y.com",
'from_name' => "TDM",
'template_id' => "xxx"),
array('sections' => array('content_tdm_body' => "TEST")));
$campSendStatus = $api->campaignSendNow($cid);
显然,活动已经创建,邮件被发送,但内容仍然是空的。
任何人都面临这种问题?我错过了什么?
答案 0 :(得分:0)
确定。得到它了。我以为我使用的是API V2 php包装器。在深入研究php包装器源代码后,我发现它是API V1.3包装器,因此我使用的是不推荐使用的API,它不支持从模板创建Campaign的HTML部分。 -