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);
有什麼建議?先謝謝你。