0
我试图使用MailChimp.net API将内容发送到MailChimp中的活动模板。我的模板中包含`Mailchimp.net可编辑内容的API和内容结构不显示
<b>mc:edit="question"</b>`
而且MailChimp API希望在一个struct /关联数组JSON字符串。不过,我似乎无法得到的数据可编辑部分显示出来,我已经尝试了几种不同的方式:
CampaignSegmentOptions segmentOptions = new CampaignSegmentOptions();
segmentOptions.Match = "All";
CampaignCreateContent content = new CampaignCreateContent();
content.HTML = "<p>Testing</p>";
CampaignCreateOptions options = new CampaignCreateOptions();
options.Title = "Testing";
options.ListId = listID;
options.ToName = "Test Name";
options.FromEmail = "[email protected]";
options.FromName = "Testing from Example.com";
options.Subject = "Test Subject";
options.FacebookComments = false;
//Using struct attempt
sections s = new sections();
s.question = "What did the lion need?";
//Using string attempt
//String[] s = new string [] {"question\":\"What did the lion need?"};
//Using dictionary attempt
Dictionary<string,string> dict = new Dictionary<string,string>();
dict.Add("question","What did the lion need?");
content.Sections = dict;
Campaign result = mc.CreateCampaign("regular", options, content);
有什么建议?先谢谢你。