More in this section

Forums / Developing with Sitefinity / Programmatically trigger a Newsletter for blog notifications?

Programmatically trigger a Newsletter for blog notifications?

2 posts, 0 answered
  1. bemara57
    bemara57 avatar
    135 posts
    27 Mar 2008
    24 Sep 2010
    Link to this post
    I am trying to notify subscriber groups every time a blog is posted. I saw this thread about attaching to the CreateContent event (, but it will not work in this case because saving the blog post will take an extremely long time to finish sending out a notification to hundreds of subscribers. I think I should use the Telerik.Notification assembly for this?

    I tried looking in the Telerik.Notifications.Newsletters.DataManager, but there is nothing like "SendNewsletter(Guid templeteId, Guid groupId)". I did come across IModuleEvent and IEvent, but there was no documentation on this.

    So is it possible for the API to trigger a Newsletter to be sent in the background and let the user continue without waiting for it? OR should I be going about this differently?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    26 Sep 2010
    Link to this post
    Hello bemara57,

    If you use Newsletters module you can send an email by using SendEmails method of MailingServiceProxy class. You can subscribe for Executed event of ContentManager class and call SendEmails method. If you want to avoid some delays you can run the code with Ticker so that the sending will not start during saving, but after that. Another option is creating a scheduled service that runs periodically - every 15 minutes and checks for any created content.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered