Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Brad 94 posts 151 karma points
    Jul 22, 2013 @ 04:11
    Brad
    0

    Custom Mailing list?

    Is it possilbe to create a custom mailing list? 

    I have a membership system on my site. 

    My members email address is stored in their 'profile' info along with a boolen of if they want to recived the newsletter or not. 

    I need a customise mailing list that sends to just those that have the bit ticked?

    How do to go about creating a custom mailing list on Newsletter studio? 

     

     

  • Brad Ford 34 posts 75 karma points
    Jul 22, 2013 @ 05:56
    Brad Ford
    0

    Ok, I found the Subscrption Provider sample project and have used that as a guild to creating my own Subscription Provider.

    Just trying to work out now how to add this to my project..

  • Brad Ford 34 posts 75 karma points
    Jul 22, 2013 @ 07:10
    Brad Ford
    0

    I have had not luck adding my new Subscription provided to my project. This is what I have thus far.

    First I created a new class in theSubscriptionProviders folder in the NewsletterStudioContrib I got from here...

    https://github.com/enkelmedia/NewsletterStudioContrib

    The code I put in there as a copy of the code from one of the examples. I just changed it to get all the members from my membership system who want the newsletter.

    Here is the code.

     

     public class TheSiteSubscriptionProvider : SubscriptionProviderBase
        {
            public override string UniqName { get { return "TheSiteSubscriptionProvider"; } }

            public override string DisplayName { get { return "TheSite"; } }

            public override List<Receiver> GetSubscribersForSendOut(string listItemValue, SendOutParams parameters)
            {

                MembershipUserCollection users = Membership.GetAllUsers();
                var listAll = new List<TheSiteReciever>();

                foreach (MembershipUser m in users)
                {
                    var mp = MemberProfile.GetUserProfile(m.UserName);

                    var dataProviderKey = mp.AuthGuid;
                    var email = mp.Email;
                    var fullname = string.Format("{0}", mp.AvatarName);
                    var orderDate = DateTime.Now;

                    if (mp.SendNewsletter == "True")
                    {
                        var newReciever = new TheSiteReciever()
                        {
                            DataProviderKey = dataProviderKey,
                            Email = email,
                            Fullname = fullname,
                            OrderDate = orderDate
                        };

                        listAll.Add(newReciever);
                    }


                }
                return (from item in listAll select new Receiver() { DataProviderKey = item.DataProviderKey, Email = item.Email, Fullname = item.Fullname }).ToList();
            }

     

     

    (Note: I'm not sure what DataProviderKey is. If is some required value or just an example values I can change or remove as I see fit. I've not gotten far enough in to know yet. But I digress)

    Once I compiled this project I copied it's DLL to the bin folder in the Umbraco project

    I then opened the config/newsletterStudio.config file and added this line within the <subscriptionProviders> tags. .

        <provider name="TheSiteSubscriptionProvider" type="NewsletterStudio.Bll.Providers.TheSiteSubscriptionProvider, NewsletterStudio" />
     

    Finally I restarted my browser, ran Newsletter studio tried to send a newletter and pick my new Provider, and this is what I got.

    Note: I have removed all lists that are not relvant to my project so I expect to see just my provider here

    Why is my provider not appearing?

     

     

     

     

     

     

     

     

     

     

     

  • Markus Johansson 1938 posts 5866 karma points MVP 2x c-trib
    Jul 22, 2013 @ 10:28
    Markus Johansson
    0

    Hi!

    I'm quite sure that "NewsletterStudio.Bll.Providers.TheSiteSubscriptionProvider, NewsletterStudio" is not the full name of your own assembly / class?

    You'll need to change this to something like: YourAssembly.Namespace.OtherNamespace.ClassName, Assembly".

    Please read this:
    http://msdn.microsoft.com/en-us/library/2exyydhb.aspx


     

  • Brad Ford 34 posts 75 karma points
    Jul 23, 2013 @ 05:28
    Brad Ford
    1

    Thanks Markus..

    That link did the trick.

    My DLL was not in the GAC but I was able to find what I needed by loading the DLL into Ildasm.exe

    For those that might follow. This is what my (finally) working provider code in the config file looks like

    <provider name="TheSiteSubscriptionProvider" type="NewsletterStudioContrib.SubscriptionProviders.TheSiteSubscriptionProvider, NewsletterStudioContrib" />

     

    This is what my project looks like..

    The dlls from the top 2 projects along with a few other files, get copied to the main Umbraco bin folder whenever I compile this solution.

    The Namespace in the .cs file is...

    namespace NewsletterStudioContrib.SubscriptionProviders

    Pretty obvious now.

    Brad

     

  • Markus Johansson 1938 posts 5866 karma points MVP 2x c-trib
    Jul 23, 2013 @ 11:00
    Markus Johansson
    0

    Hi!

    Great that its working!

    You don't need to put the dll in the GAC (Global Assembly Cache), you just need to put the dll in the local binfolder of your Umbraco-project and make sure that the assembly name in the configuration-file is correct.

    Let me know if you need more help!

    / markus

  • Hassan 79 posts 264 karma points
    Jul 18, 2016 @ 10:22
    Hassan
    0

    Hi

    I created a subscription provider that fetch Emails from SQL Server database and Emails sent correctly.

    I can see the name of my list only in send option, but I can not see the list in mailing lists section. So I can not see the list of emails and edit and delete them. See this picture:

    enter image description here

    I want to see the list in mailing lists. What can I do for it?

    With thanks

  • Markus Johansson 1938 posts 5866 karma points MVP 2x c-trib
    Jul 25, 2016 @ 10:01
    Markus Johansson
    0

    Hi!

    Thats right! The "Subscription provider" model does not support create/edit at the moment so you can not edit the items from the Newsletter Studio UI.

    Most of the time this is not a requested feature as the idea with the provider model is to connect to other storage sources than the built in one - these sources most of the time have there own UI for editing.

    We don't have any plans on implementing this in the future af the moment so you will have to create your own UI for this.

    Or if you're just using a storage for mailing lists and subscribers - why not use the built in solution?

    Cheers!

    // m

Please Sign in or register to post replies

Write your reply to:

Draft