Modifying subscribers

To modify a specific subscriber, you use the NewslettersManager class. The following code modifies the specified subscriber through the Native API.

 

public void ModifySubscriber(Guid subscriberId, string newFirstName)
{
    NewslettersManager manager = NewslettersManager.GetManager();
 
    Subscriber subscriber = manager.GetSubscribers().Where(s => s.Id == subscriberId).SingleOrDefault();
 
    if (subscriber != null)
    {
        subscriber.FirstName = newFirstName;
        manager.SaveChanges();
    }
}

First, you initialize the NewslettersManager. Then, you get the specified subscriber. Finally, you modify the first name, and save the changes.

See Also

Other Resources

Related topics:

Feedback

How useful is this article?

Tell us more

Submit
Your message was successfully sent.

We appreciate your feedback.

Your message could not be sent.

OK