का उपयोग कर रहा बना सकते हैं और तुरंत MailChimp.com
में अभियानों भेजने की जरूरत बनाने के लिए। मैंने इस उद्देश्य के लिए C# wrapper Percepective MCAPI.dll
का उपयोग किया।कैसे MailChimp में एक अभियान ASP.Net
, इसका स्पष्ट है कि हम सूचियों नहीं कर सकते हैं लेकिन अभियान बना सकते हैं। मैंने कोड की कोशिश की लेकिन campaignID is retured null
; कम से कम कोई अपवाद नहीं फेंक दिया। मैंने campaigntype to Auto
सेट किया था।
try { string apiKey = "api-us2"; // API KEY is valid string emailAddress = "[email protected]"; listsForEmailInput lstForEmailInput = new listsForEmailInput(apiKey, emailAddress); listsForEmail cmd = new listsForEmail(lstForEmailInput); listsForEmailOutput lstEmailOutPut = cmd.Execute(); List lstResults = lstEmailOutPut.result; string listID = lstResults[0]; // Got Precraeted List ID(Valid Confirmed) Console.WriteLine("\n" + listID); // compaign Create campaignCreateOptions campaignCreateOpt = new campaignCreateOptions(); campaignCreateOpt.list_id = listID; campaignCreateOpt.subject = " New Campaign from dev_Anil"; campaignCreateOpt.from_email = "[email protected]"; campaignCreateOpt.from_name = "anil"; Dictionary content = new Dictionary(); content.Add("html", "Helloaasdsa"); content.Add("text", "Hi all !! this is dev_anil"); content.Add("url", ""); content.Add("archive", ""); campaignSegmentOptions csOptions = new campaignSegmentOptions(); csOptions.match = "any"; // Could not set Condition -- need help for this // Need to set a Dictionary typeOptions because null is not supported Dictionary typeOptions = new Dictionary(); campaignCreateParms campaignCreateParms = new campaignCreateParms(apiKey, EnumValues.campaign_type.auto, campaignCreateOpt, content, csOptions, typeOptions); campaignCreateInput campaignCreateInput = new campaignCreateInput(campaignCreateParms); campaignCreate campaignCreate = new campaignCreate(campaignCreateInput); campaignCreateOutput ccOutput = campaignCreate.Execute(campaignCreateInput); string abc = ccOutput.result; // This comes out to null } catch(Exception ee) { Console.WriteLine("\n\n Exception :" + ee.Message); // no exception }
किसी को भी सही दिशा और क्या कोड के साथ गलत है दिखा सकते हैं:
यहां मेरे कोड का टुकड़ा है।
किसी भी मदद की बहुत सराहना की जाएगी।
धन्यवाद।
: एल त्रुटि 506: Autoresponders मासिक पर ही उपलब्ध हैं और पे-के रूप में-यू-गो खातों। – Edd
लेकिन मैं इसे इस कोड को जहां इस तरह तैयार है से नहीं मिल सकता है ... मैं typeOptions शब्दकोश के मूल्यों को निकाल दिया लेकिन उसे वहाँ से नहीं था .. – Edd
हाय अनिल: campaignSegmentCondition मुझे त्रुटि मेरी संकलक vs'13 में पता चलता है। कृपया मुझे कुछ रास्ता दिखाएं :( –