Click or drag to resize
ISubscriptionServiceSubscribe Method (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.

Namespace: CMS.Newsletters
Assembly: CMS.Newsletters (in CMS.Newsletters.dll) Version: 10.0.0
Syntax
C#
void Subscribe(
	int subscriberID,
	int newsletterID,
	SubscribeSettings subscribeSettings
)

Parameters

subscriberID
Type: SystemInt32
Subscriber ID
newsletterID
Type: SystemInt32
Newsletter ID
subscribeSettings
Type: CMS.NewslettersSubscribeSettings
Options defining additional behavior of this method. Cannot be null.
Exceptions
ExceptionCondition
ArgumentNullExceptionsubscribeSettings is null
ArgumentExceptionNewsletter does not exist or email is not specified
Remarks
If the subscription is approved, performs logging of the subscription logging activity.
See Also