Click or drag to resize
SubscriberInfoProviderSubscribe Method (Int32, Int32, DateTime, Boolean, Boolean)
Subscribes subscriber to newsletter.

Namespace: CMS.Newsletters
Assembly: CMS.Newsletters (in CMS.Newsletters.dll) Version: 8.2.23
Syntax
C#
public static void Subscribe(
	int subscriberId,
	int newsletterId,
	DateTime when,
	bool sendConfirmationEmail = true,
	bool sendOptInEmail = true
)

Parameters

subscriberId
Type: SystemInt32
Subscriber ID
newsletterId
Type: SystemInt32
Newsletter ID
when
Type: SystemDateTime
Time when the subscriber was subscribed (used by import)
sendConfirmationEmail (Optional)
Type: SystemBoolean
Indicates whether send confirmation e-mail
sendOptInEmail (Optional)
Type: SystemBoolean
Indicates if double opt-in e-mail should be send
Exceptions
ExceptionCondition
InvalidOperationExceptionThrown when subscriber's site doesn't exist
See Also