More in this section

Forums / Bugs & Issues / unsubscribe users from mailing lists(email campaigns)

unsubscribe users from mailing lists(email campaigns)

2 posts, 0 answered
  1. Phani
    Phani avatar
    9 posts
    18 Mar 2014
    02 Oct 2014
    Link to this post

    Hello All,

    Sitefinity's default unsubscribe link is not visible in the emails that I send out. I tried to find a solution online but could not find anything. So, I decided to implement my own logic of unsubscribing users from mailing lists. I implemented it tested it, all works fine.

    Consider the following scenario:

     1)I create a new mailing list

    2)I import subscribers from a csv file to the mailing list. let us assume csv contains 10 records and the email of one of them is

    3)I create a campaign and send out an issue with my unsubscribe link in the email. 

    4) user gets the email, decides to unsubscribe. So, clicks on unsubscribe link and so he is removed from the mailing list.

    5) Now I go back to the mailing list, and reimport the csv list. the user gets back on the mailing list and gets all emails again going forward.

    Is there some way to keep the user and flag him as unsubscribed? I can maintain a separate list of unsubscribed users and which mailing list they unsubscribed from, but when the import happens, how do I exclude the users who unsubscribed already?

    PS: I am using Sitefinity 6.3



  2. Svetoslav Manchev
    Svetoslav Manchev avatar
    735 posts
    06 Sep 2017
    07 Oct 2014
    Link to this post
    Hello Phani,

    As you have a custom code to unsubscribe the users, you can implement a logic to manage separate list for that unsubscribed users.

    Than on User import you can add your logic once the users are imported to remove the already unsubscribed ones. To do so:
    - Inherit the ImportSubscribers dialog:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using Telerik.Sitefinity.Modules.Newsletters.Web.UI.Forms;
    namespace SitefinityWebApp.Examples
        public class MyImport : ImportSubscribers
            protected override void ImportSubscribersButton_Click(object sender, EventArgs e)
                base.ImportSubscribersButton_Click(sender, e);
                // implement your logic for the already unsubscribed users
    - Register this control in Global.asax:
    protected void Application_Start(object sender, EventArgs e)
        Bootstrapper.Initialized += new EventHandler<Telerik.Sitefinity.Data.ExecutedEventArgs>(Bootstrapper_Initialized);
    private void Bootstrapper_Initialized(object sender, Telerik.Sitefinity.Data.ExecutedEventArgs e)
        if (e.CommandName == "Bootstrapped")
            ObjectFactory.Container.RegisterType(typeof(DialogBase), typeof(MyImport), (typeof(ImportSubscribers)).Name);
    Note that you need to have the following using
    using Telerik.Microsoft.Practices.Unity;

    Svetoslav Manchev
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
2 posts, 0 answered