ISubscriptionServiceUnsubscribeFromSingleNewsletter Method |
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.
Namespace: CMS.NewslettersAssembly: CMS.Newsletters (in CMS.Newsletters.dll) Version: 12.0.0
Syntax void UnsubscribeFromSingleNewsletter(
string email,
int newsletterID,
Nullable<int> issueID = null,
bool sendConfirmationEmail = true
)
Parameters
- email
- Type: SystemString
Email address - newsletterID
- Type: SystemInt32
Newsletter to unsubscribe email from - issueID (Optional)
- Type: SystemNullableInt32
ID of issue that visitor used for unsubscription. Use only when issue ID is known. When issue ID is present, number of unsubscriptions for this issue is increased - sendConfirmationEmail (Optional)
- Type: SystemBoolean
If true, confirmation email will be send after successful unsubscription
Exceptions Exception | Condition |
---|
ArgumentException | Newsletter does not exist or email is not specified |
See Also