Sending HTML Campaigns

Apr 9, 2011 at 1:05 PM

Hi,

According to http://apidocs.mailchimp.com/1.3/campaigncreate.func.php, "content" object has several properties like text, html, url , archive. But when i use MCAPI.NET, there is only one property (Text) for Campaign.Content.Base object. I need to set value of HTML. Can anyone assist me in this regard?

Thanks,
Vijay Arunraj.J

Coordinator
Apr 9, 2011 at 5:10 PM
Edited Apr 9, 2011 at 5:12 PM

Use derived classes to create campaign (Html, Template, etc).

Apr 14, 2011 at 11:10 AM

Hi denisk,

Thanks for the solution. That works like charm. Here's a working sample code (Someone needy may be benefited):

Campaign.Content.Html campaignContentHtml = new Campaign.Content.Html();
campaignContentHtml.Html = "My <b>Html</b> email";
campaignContentHtml.Text = "My  Html  email";

campaignId = MCApiModule.Campaign.create(m, Campaign.Type.Regular, campaignOptions, campaignContentHtml, null, null);

 

Thanks,

Vijay Arunraj.J

Coordinator
Apr 14, 2011 at 11:34 AM

Or, 


campaignId = m.CampaignCreate(Campaign.Type.Regular, campaignOptions, campaignContentHtml);


 

Static methods were intended for use in F# environment :)