I've got a new build coming up soon and one of the client requirements is the ability to sign up to a 'news letter'.
In it's simplest format a member will sign up for a news letter and the news letter functionality will run on at scheduled times and what it needs to do is check content for any content amendments/additions that have happened in since the last schedule ran and email the subscribers with links to the new/amended content.
I don't really know where to start with this one (I can't work out the how the Umbraco SQL tables tie together either) so I wondered if anyone could give me some advice on acheiving this.
you can use contentservice and check the update property of the nodes or you can use typedcontent to check the updatedate without database access.
In an event handler you can set a relation with relationService between node and subscribed members everytime if a node is updated. After scheduled task you must remove the relation between this node. Or you can use a custom table, maybe with petapoco, to save the changed nodeIds.
But this is only a possibility and there are certainly other or better.
Send email to members when content changes
Hi Folks,
I've got a new build coming up soon and one of the client requirements is the ability to sign up to a 'news letter'.
In it's simplest format a member will sign up for a news letter and the news letter functionality will run on at scheduled times and what it needs to do is check content for any content amendments/additions that have happened in since the last schedule ran and email the subscribers with links to the new/amended content.
I don't really know where to start with this one (I can't work out the how the Umbraco SQL tables tie together either) so I wondered if anyone could give me some advice on acheiving this.
Thanks in advance,
Craig
Hi Craig,
you can use contentservice and check the update property of the nodes or you can use typedcontent to check the updatedate without database access.
In an event handler you can set a relation with relationService between node and subscribed members everytime if a node is updated. After scheduled task you must remove the relation between this node. Or you can use a custom table, maybe with petapoco, to save the changed nodeIds.
But this is only a possibility and there are certainly other or better.
Hope this helps.
Sören
Hi Craig,
I have a simpler idea:
Check all nodes if the update date is greater than the last date of your scheduled task with api.
Sören
Thanks Soren,
To be honest I don't understand what you mean by using a contentservice....
Thanks again,
In the DB what tables/fields would I be looking for do you know?
Hi Craig,
you need not manually access the database. You can use the contentservice in umbraco api.
Documentation:
http://our.umbraco.org/documentation/Reference/Management-v6/Services/ContentService
You can look for the updateDate-Property:
http://our.umbraco.org/documentation/Reference/Management-v6/Models/Content
Sören
Ok that's brill. I shall have a read up :)
Works for me!
Cheers Soren
is working on a reply...