Beispiel #1
0
        public bool Subscribe(ONETUGMember member)
        {
            MailChimpManager mc          = new MailChimpManager(_mailchimpKey);
            MyMergeVar       myMergeVars = new MyMergeVar();

            myMergeVars.FirstName = member.FirstName;
            myMergeVars.LastName  = member.LastName;          //  Create the email parameter
            EmailParameter email = new EmailParameter()
            {
                Email = member.EmailAddress
            };

            EmailParameter results = mc.Subscribe(_mailchimpGroupId, email, myMergeVars);

            return(string.IsNullOrEmpty(results.LEId));
        }
Beispiel #2
0
        // POST api/mailchimp
        public string Post(Subscriber subscriber)
        {
            MailChimpManager mc          = new MailChimpManager(_mailchimpKey);
            MyMergeVar       myMergeVars = new MyMergeVar();

            myMergeVars.FirstName = subscriber.FirstName;
            myMergeVars.LastName  = subscriber.LastName;          //  Create the email parameter
            EmailParameter email = new EmailParameter()
            {
                Email = subscriber.EmailAddress
            };

            EmailParameter results = mc.Subscribe(_mailchimpGroupId, email, myMergeVars);

            return(results.LEId);
        }