将订阅者添加到给定列表以及兴趣组邮件chimp VB

时间:2014-09-02 04:50:59

标签: vb.net mailchimp

我想在mailchimp中以编程方式向订阅用户添加兴趣组。我有四个复选框,我可以获得名字电子邮件和其他详细信息,但不是名为Area的组。有什么方法可以检查该表格中的复选框

我试过这样但没有奏效。

enter image description here

 Dim mcApi As MailChimp.MCApi = New MailChimp.MCApi(apiKey, False)

    Dim options = New MailChimp.Types.List.SubscribeOptions()
    Dim lstinterr = mcApi.ListInterestGroupings("7c785ac86f")
    options.DoubleOptIn = True
    options.EmailType = MailChimp.Types.List.EmailType.Html
    options.SendWelcome = True


    Dim intrestGrop = New MailChimp.Types.List.InterestGroup("1", "Northern Beaches / North Shore", 1, 264)
    Dim groupingList = New MailChimp.Types.MCList(Of MailChimp.Types.List.InterestGroup)()

    groupingList.Add(intrestGrop)




    Dim grouping1 = New MailChimp.Types.List.InterestGrouping(4777, "Area", MailChimp.Types.List.GroupingType.Checkboxes = 1, 0, groupingList)

     Dim mergeText = New MailChimp.Types.List.Merges("sillyvolley@gmail.com", MailChimp.Types.List.EmailType.Text) From {{"FNAME", "Hareesh"}, {"LNAME", "Eeram"}, {"PWD", "Eeram"}, {"GROUPINGS", grouping1}}
    Dim merges = New List(Of MailChimp.Types.List.Merges)() From {mergeText}


    Dim batchSubscribe = mcApi.ListBatchSubscribe(listId, merges, options)

如果不是VB,即使是c#也适合我。感谢

0 个答案:

没有答案