CSMailSubscriptionHandler Class Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

Provides a working implementation of a Content Studio Subscription Mail message event handler.
Inheritance Hierarchy

SystemObject
  ContentStudio.Document.Subscription.EventHandlerSubscriptionEventHandlerBase
    ContentStudio.Document.Subscription.EventHandlerMailSubscriptionHandler
      ContentStudio.Document.Subscription.EventHandlerCSMailSubscriptionHandler

Namespace: ContentStudio.Document.Subscription.EventHandler
Assembly: CSSubscriptionEventHandler (in CSSubscriptionEventHandler.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax

public class CSMailSubscriptionHandler : MailSubscriptionHandler

The CSMailSubscriptionHandler type exposes the following members.

Constructors

  NameDescription
Public methodCSMailSubscriptionHandler
Initializes a new instance of the CSMailSubscriptionHandler class.
Top
Properties

  NameDescription
Protected propertyActivatedSubscribersOnly
Gets or sets a value indicating whether to read activated subscribers only.
Protected propertyConnectionId (Inherited from SubscriptionEventHandlerBase.)
Protected propertyContent Obsolete. (Inherited from SubscriptionEventHandlerBase.)
Protected propertyCredentials
Gets the credentials to use when communicating with the message server. The data was passed in the content argument of the EventHandler(Int32, Int32, String, String, ICSCredentialsContainer, Int32, String) method inc combination with the xml passed in.
(Inherited from SubscriptionEventHandlerBase.)
Protected propertyEventId (Inherited from SubscriptionEventHandlerBase.)
Protected propertyExtendedProperties
Gets or a collections of extended properties that was sent to the event handler.
(Inherited from SubscriptionEventHandlerBase.)
Public propertyFailedCount
Gets or sets the number of subscribers to whom a message was not sent for some reason.
(Inherited from SubscriptionEventHandlerBase.)
Protected propertyFailureRetryInterval
Gets the interval that the handler should wait before it tries to resend a failed message.
(Inherited from MailSubscriptionHandler.)
Protected propertyLogger
Gets or sets the logger object that is used when logging to a syslog.
(Inherited from SubscriptionEventHandlerBase.)
Protected propertyMaxNumberOfAllowedFailedRecipients
Gets or sets the max number of allowed failed recipients allowed before the event handler reports an error and stops.
(Inherited from MailSubscriptionHandler.)
Public propertyMessage
Gets the mail message to be sent out to a subscriber.
(Inherited from MailSubscriptionHandler.)
Protected propertyMessageDocumentUrl
Gets URL to the Content Studio document to send to subscribers.
(Inherited from MailSubscriptionHandler.)
Protected propertyNumberOfFailedRecipients
Gets the number of failed recipients during the mail sending operation.
(Inherited from MailSubscriptionHandler.)
Protected propertyOriginalBody
Gets the original body.
(Inherited from MailSubscriptionHandler.)
Protected propertyOriginalHtmlBody
Gets the original message body generated from the Content Studio message source document.
(Inherited from MailSubscriptionHandler.)
Protected propertyPageSize
Gets or sets the number of subscribers read in every page.
Protected propertyProperties
Gets the regular properties that was passed in to the event handler.
(Inherited from SubscriptionEventHandlerBase.)
Protected propertyRecipientFailRetryLimit
Gets the maximum number of times that the event handler should try to resend a message to a client when there is a non-fatal, temporary error.
(Inherited from MailSubscriptionHandler.)
Public propertySendCount
Gets or gets the number of sent messages.
(Inherited from SubscriptionEventHandlerBase.)
Protected propertySessionId
Gets the numeric value of the session used by the Service Manager when it communicates with Content Studio.
(Inherited from SubscriptionEventHandlerBase.)
Protected propertySmptClient
Gets a SMPT client to use when sending mail messages.
(Inherited from MailSubscriptionHandler.)
Protected propertySmtpFailureLimit
Gets the number of SMTP failures that is accepted before the handler stops and reports an error.
(Inherited from MailSubscriptionHandler.)
Public propertyStatusText
Gets the status text that is sent back to the Service Manager after that the event handler has finished. For success this value can be "OK" or "Success". The status can also be an informative message that should be logged in the Content Studio event log.
(Inherited from SubscriptionEventHandlerBase.)
Public propertySubscribers
Gets or gets the number of found subscribers.
(Inherited from SubscriptionEventHandlerBase.)
Protected propertySubscriptionTypeHandled
Gets or sets the subscription type handled.
(Inherited from SubscriptionEventHandlerBase.)
Protected propertyTimeOut (Inherited from SubscriptionEventHandlerBase.)
Top
Methods

  NameDescription
Protected methodCreateLogger
Creates the logger object that logs events to its implementation of the ISysLogWriter interface.
(Inherited from SubscriptionEventHandlerBase.)
Protected methodCreateMessage
When implemented in derived class creates a message to be sent out to subscribers. This method gets called once from the event handler.
(Overrides MailSubscriptionHandlerCreateMessage.)
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from SubscriptionEventHandlerBase.)
Protected methodDispose(Boolean)
Releases unmanaged and - optionally - managed resources
(Inherited from MailSubscriptionHandler.)
Public methodEquals (Inherited from Object.)
Public methodEventHandler
Defines an asyncronous Content Studio event handler. This method gets called by Content Studio Service Manager when it needs to handle a subscription related event.
(Inherited from SubscriptionEventHandlerBase.)
Protected methodFinalize
Releases unmanaged resources and performs other cleanup operations before the SubscriptionEventHandlerBase is reclaimed by garbage collection.
(Inherited from SubscriptionEventHandlerBase.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Protected methodReadData
Gets a list of subscribers that should receive messages.
(Overrides SubscriptionEventHandlerBaseReadData(Int32).)
Protected methodSendMessage
Sends the message to the specified subscriber.
(Overrides MailSubscriptionHandlerSendMessage(SubscriptionInformation).)
Protected methodSetMailMessageContent
Sets a new Html body an text body of a message.
(Inherited from MailSubscriptionHandler.)
Protected methodSetStatus
Sets the status text that is sent back to the Service Manager after that the event handler has finished.
(Inherited from SubscriptionEventHandlerBase.)
Public methodToString (Inherited from Object.)
Protected methodValidateEvent
When implemented in derived classes, checks if the the event passed in is valid for this implementation.
(Inherited from MailSubscriptionHandler.)
Protected methodCode exampleValidateMessage
Validates a message before it is sent to a single subscriber.
(Inherited from MailSubscriptionHandler.)
Protected methodValidateSubscriber
Validates the subscriber to see if he/she should receive the message.
(Inherited from MailSubscriptionHandler.)
Public methodCode exampleWriteToLog
Writes a message to the logger provided that a logger exists.
(Inherited from SubscriptionEventHandlerBase.)
Top
Events

  NameDescription
Protected eventFinished
Occurs when the event handler has done its job.
(Inherited from SubscriptionEventHandlerBase.)
Protected eventInitialized
Occurs when the event handler has parsed and read all of the passed in even handler arguments but before the actual job has started. A developer can subscribe to this event to do private initialization specific to the current implementation.
(Inherited from SubscriptionEventHandlerBase.)
Top
Remarks

This class generates a mail message from a Content Studio document and sends this out to subscribers in the documents category. CSMailSubscriptionHandler can handle both the OnDocumentSubscription and OnTestDocumentSubscription. In the former case all subscribers that receives mails are read from the Content Studio Subscription definition repository on the actual category. In the latter case a singel subscriber is read from the data passed in to the job queue in Content Studio that defined the event handled.
See Also

Reference