Click or drag to resize
ISubscriptionServiceSubscribe Method (ContactInfo, NewsletterInfo, SubscribeSettings)
Subscribes contact to given newsletter.

Namespace: CMS.Newsletters
Assembly: CMS.Newsletters (in CMS.Newsletters.dll) Version: 13.0.131
Syntax
C#
void Subscribe(
	ContactInfo contact,
	NewsletterInfo newsletter,
	SubscribeSettings subscribeSettings
)

Parameters

contact
Type: CMS.ContactManagementContactInfo
ContactInfo object.
newsletter
Type: CMS.NewslettersNewsletterInfo
NewsletterInfo object.
subscribeSettings
Type: CMS.NewslettersSubscribeSettings
Options defining additional behavior of this method. Cannot be null.
Exceptions
ExceptionCondition
ArgumentNullExceptionEither contact, newsletter, or subscribeSettings is null.
Remarks
If the subscription is approved, performs logging of the subscription logging activity. Whether or not email is removed from newsletter unsubscription or "unsubscribe from all" list can be specified in subscribeSettings parameter.
See Also