public bool UpdateSubscriber(PlayersExt model) { bool status = true; try { var mcApi = new MCApi(apiKey, false); var merges = GetListOfMerges(model); var returnval = mcApi.ListUpdateMember(listId, model.EmailAddress, merges, List.EmailType.Html, true); } catch (Exception ex) { //If try to update and didn't found any record so it means it is not already Subscribed. //in this case Subscribe the player if (IgnoreMailchimpErrors(ex.Message)) { status = Subscribe(model); } else { ErrorHandling.HandleException(ex); status = false; } } return status; }
public bool UpdateSubscriberEmail(string oldEmail, string newEmail, string apiKey) { var mcApi = new MCApi(apiKey, true); var merges = new List.Merges(); var subscriptionOptions = new List.SubscribeOptions(); subscriptionOptions.UpdateExisting = true; subscriptionOptions.DoubleOptIn = false; subscriptionOptions.SendWelcome = false; return mcApi.ListUpdateMember().ListSubscribe(list, email, merges, subscriptionOptions); }