Since version 1.4.5 and 2.1 Newletter Studio contains some events that you as a developer can use when you develop your solutions.
 

Event name v1.4.5+ v2.1+
NewsletterStudio.Services.SendNewsletterService.SendningInitializing Yes Yes
NewsletterStudio.Services.SendNewsletterService.Sent Yes Yes
NewsletterStudio.Services.SendNewsletterService.SendingUnique Yes Yes
NewsletterStudio.Services.SendNewsletterService.SentUnique Yes Yes
NewsletterStudio.Infrastucture.Services.TrackingService.AddingTrackingEvent n/a Yes
NewsletterStudio.Infrastucture.Services.TrackingService.AddedTrackingEvent n/a Yes
NewsletterStudio.Infrastucture.Services.TrackingService.Unsubscribing n/a Yes
NewsletterStudio.Infrastucture.Services.TrackingService.Unsubscribed n/a Yes


The easiest way to use the events is to just type the full class name and press "Tab" in Visual Studio, but here are a code example of how an implementation might look:

NewsletterStudio.Services.SendNewsletterService.Sent +=
    delegate(object sender, NewsletterSentEventArgs args)
    {
        // Get id like this
        int? nodeId = args.Newsletter.ContentNodeId;

        // Do something cool
    };

 

Another example of how to hook up to an event can be found on GitHub.


More articles on "Develop with Newsletter Studio"

Control content with Render Tasks

Using a render task an developer can hook into the rendering process of the email and make changes to the message body/subject. This can be done both on an overall level and on each individual email (ie. personalization). This feature could for example be used to replace [sometext] inside the messag…



Read article

Subscription Providers

Can be used to hook into other systems or data sources. Newsletter Studio will use the providers to fetch the needed information about the receivers. All current subscriptions options (Newsletter Studios native mailing list and Umbraco members) are build with providers and it's easy to implement you…



Read article

Front end API

To interact with Newsletter Studio from the front end we provide a very simple API in the static class NewsletterStudio.Api. This class has several methods for adding and removing subscribers both from the built in subscriptions and from Umbraco's member section (it won't delete anything but it chan…



Read article

Custom data fields

The default property fields for receivers in Newsletter Studio are: name, e-mail, subscribed date and status. But some clients want to add custom data to their contacts.Since version 2.1 we've decided to prepare the underlying data layer for this by adding a new property called “Data” on the Receive…



Read article