Click or drag to resize
ISubscriptionService Interface
Handles all work with subscriptions and unsubscriptions.

Namespace: CMS.Newsletters
Assembly: CMS.Newsletters (in CMS.Newsletters.dll) Version: 11.0.0
Syntax
C#
public interface ISubscriptionService

The ISubscriptionService type exposes the following members.

Methods
  NameDescription
Public methodCode exampleGetAllActiveSubscriptions
Method returns all subscriptions for given contact. Contact can be subscribed directly or using contact group. Only active subscriptions are retrieved (not approved one are omitted, unsubscriptions are reflected). Does not filter out subscriptions blocked using bounces.
Public methodIsSubscribed(Int32, Int32)
Returns true if subscriber is subscribed to given newsletter and at the same time is not in the unsubscription list for the given newsletter.
Public methodIsSubscribed(ContactInfo, NewsletterInfo)
Returns true if given contact is subscribed to given and at the same time is not in the unsubscription list for the given newsletter.
Public methodIsUnsubscribed
Returns true if specified email address is unsubscribed from newsletter.
Public methodRemoveSubscription
Unsubscribe the subscriber from the newsletter. Removes the binding from newsletter subscriber table.
Public methodSubscribe(ContactGroupInfo, NewsletterInfo)
Subscribes contact group to given newsletter.
Public methodSubscribe(Int32, Int32, SubscribeSettings)
Subscribes subscriber to given newsletter. Removes the email from unsubscription list for given newsletter. Whether or not email is removed from "unsubscribe form all" list can be specified in subscribeSettings parameter. subscribeSettings parameter specifies whether confirmation email will be send and if subscription should be approved immediately.
Public methodSubscribe(ContactInfo, NewsletterInfo, SubscribeSettings)
Subscribes contact to given newsletter. Removes the email from unsubscription list for given newsletter. Whether or not email is removed from "unsubscribe from all" list can be specified in subscribeSettings parameter. subscribeSettings parameter specifies whether confirmation email will be sent and if subscription should be approved immediately.
Public methodUnsubscribeFromAllNewsletters
Unsubscribes the email from all newsletters. SubscriberUnsubscribes event is invoked after unsubscribing. Binding in the newsletter-subscription table will stay. Email will be added into the unsubscription list.
Public methodUnsubscribeFromSingleNewsletter
Unsubscribes the email from newsletter. SubscriberUnsubscribes event is invoked after unsubscribing. Binding in the newsletter-subscription table will stay. Email will be added into the unsubscription list. Optionally, you can decide whether to send confirmation email.
Top
See Also