This project is read-only.

Custom Newsletter notification?

Topics: ASP.NET 2.0, Controls
Mar 1, 2011 at 3:21 PM

On our hiking club website I have the Newsletter configured to not only send notifications of posts but also new /updated pages. (Thanks to Ben)

I am wondering if a custom second Newletter could be configured to send only the new/updated pages with the subject eHikes in the page title?

Thanks for your help.

Mar 2, 2011 at 10:10 AM

Do you mean you would have 2 Newsletter widgets on a page at the same time ... each with a separate list of subscribers?

If so, this is possible, but requires some changes to the Newsletter widget so it can support multiple instances.  I think the widget was written with a single instance (and single subscriber list) in mind.

Mar 2, 2011 at 1:54 PM

Yes I think that is what I am seeking.

Presently I am getting a lot of requests from members that do not want to receive all the posts, they would like the option to  receive notification of the eHikes only.

So I could have 2 Newsletters, those that wish to receive all and the other to only receive the eHIkes.


Thank you.

Mar 3, 2011 at 9:45 AM

I see ... another option would be to add these types of options to the existing Newsletter widget.  But modifying the Newsletter widget so multiple instances can exist might be a better general solution that can be used by others too.  The only major customization you would then need to make is to check the Title of the post for "eHikes" in one of the Newsletter widgets.

I'll see if I can look at doing it in the next few days.  At least I don't think it's very involved.

Mar 3, 2011 at 11:20 AM

Thanks Ben.

Mar 8, 2011 at 12:19 PM

Hi Ben,

Have you had an opportunity to look into this yet?


Mar 9, 2011 at 11:15 AM

Hi Jerry ... not yet.  Hopefully soon.

Mar 14, 2011 at 9:42 AM

I created a new widget called Newsletter2.  I didn't have a lot of time for this, so basically just made a copy of the Newsletter widget, and renamed some items (mostly by adding a "2" to the end) so the Newsletter and Newsletter2 widgets can co-exist.  It can be downloaded here.

The Newsletter2 widget will save the list of subscribers in a file named newsletter2.xml in the App_Data folder (whereas the main Newsletter widget saves the list of subscribers in newsletter.xml).

Newsletter2 will only send emails if the item being saved is a Page (rather than Post) and if "eHikes" is in the title of the Page.

Give it a try when you have a chance.

Mar 14, 2011 at 1:43 PM
Edited Mar 14, 2011 at 3:12 PM

Thanks Ben, I am having an issue trying to add it to my page, I published the files to a folder called Newsletter2 under Widgets, but when I try to add the widget to the page nothing happens when I select Newsletter2 and click add.  Is there another step I am missing? Thank you.

Mar 15, 2011 at 10:42 AM

Oops, sorry ... I was mistakenly thinking you were running a newer build.  That Newsletter2 doesn't work with BE 2.0 without a couple of minor adjustments.

Here's the same Newsletter2 widget, but for BE 2.0 -- downloadable here.

It sounds like you deployed it correctly ... by just putting the Newsletter2 folder in the /widgets folder.  So give the new one above a try.

Mar 15, 2011 at 3:30 PM

Thanks Ben, it is working fine now.  Another question that I have is there a way a new label could be made that I can use to describe the function of Newletter2 so it can be different then the orginal Newsletter?  Or maybe an edit on one of the files that would override the label description.

Thanks for your help.

Mar 15, 2011 at 11:59 PM

Glad to hear it's working.  Yes, you can update the text of the widget.  The main title "Newsletter2" can be updated by clicking the widget "Edit" link to change the text to something else.  And then in widget.ascx towards the top is:

<p><%=Resources.labels.notifiedPublished %></p>

You can change that to something like:

<p>Get eHike Notifications</p>

... or whatever you'd like for that part.

Mar 16, 2011 at 12:21 AM

Great!  Thank you very much Ben.