Jak zintegrować MailChimp w C#/. Net
Chcę wysłać e-mail przez MailChimp. Jak to zrobić w. Net?
Czy ktoś ma przykładowy kod?
Dzięki.6 answers
Spójrz na PerceptiveMCAPI na CodePlex:
PerceptiveMCAPI-przyjazny dla. NET wrapper dla MailChimp API napisany w C# przez logikę percepcyjną.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2011-04-27 13:09:17
Poniższy przykład wyśle wiadomość e-mail z optem:
Najpierw zainstaluj pakiet NuGet: Install-Package mcapi.net
static void Main(string[] args)
{
const string apiKey = "6ea5e2e61844608937376d514-us2"; // Replace it before
const string listId = "y657cb2495"; // Replace it before
var options = new List.SubscribeOptions();
options.DoubleOptIn = true;
options.EmailType = List.EmailType.Html;
options.SendWelcome = false;
var mergeText = new List.Merges("[email protected]", List.EmailType.Text)
{
{"FNAME", "John"},
{"LNAME", "Smith"}
};
var merges = new List<List.Merges> { mergeText };
var mcApi = new MCApi(apiKey, false);
var batchSubscribe = mcApi.ListBatchSubscribe(listId, merges, options);
if (batchSubscribe.Errors.Count > 0)
Console.WriteLine("Error:{0}", batchSubscribe.Errors[0].Message);
else
Console.WriteLine("Success");
Console.ReadKey();
}
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2013-07-19 10:37:20
Spróbuj użyć najnowszej usługi mailchimp-Mandrill (Transactional email service)
Można go używać poprzez standardowe smtp lub api.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2012-05-04 23:47:56
Możesz spróbować na CodePlex:
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2011-07-03 13:29:56
Dla wsparcia Najnowsze Mail Chimp 3.0 API, można znaleźć wrapper dla. Net na:
MailChimp.Net -A Mail Chimp 3.0 Wrapper
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2016-07-07 08:49:28
Sprawdź https://github.com/danesparza/MailChimp.NET By Dan Esparza Możesz zainstalować pakiet używając Package Manager Console
Install-Package MailChimp.NET
Przykład kodu
MailChimpManager mc = new MailChimpManager("YourApiKeyHere-us2"); ListResult lists = mc.GetLists();
Dla wysyłanie e-maili i statystyk, Mailchimp oferuje Mandrill przez Shawna McLeana https://github.com/shawnmclean/Mandrill-dotnet
Możesz zainstalować Mandrill używając
Install-Package Mandrill
Kod przykład
MandrillApi api = new MandrillApi("xxxxx-xxxx-xxxx-xxxx"); UserInfo info = await api.UserInfo();
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2015-12-22 03:27:13