Copied to clipboard

Flag this post as spam?

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


  • Craig O'Mahony 364 posts 918 karma points
    Nov 04, 2014 @ 13:27
    Craig O'Mahony
    0

    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

  • Sören Deger 733 posts 2844 karma points c-trib
    Nov 04, 2014 @ 13:46
    Sören Deger
    0

    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

  • Sören Deger 733 posts 2844 karma points c-trib
    Nov 04, 2014 @ 13:51
    Sören Deger
    0

    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

  • Craig O'Mahony 364 posts 918 karma points
    Nov 04, 2014 @ 13:51
    Craig O'Mahony
    0

    Thanks Soren,

    To be honest I don't understand what you mean by using a contentservice....

  • Craig O'Mahony 364 posts 918 karma points
    Nov 04, 2014 @ 13:53
    Craig O'Mahony
    0

    Thanks again,

    In the DB what tables/fields would I be looking for do you know?

  • Sören Deger 733 posts 2844 karma points c-trib
    Nov 04, 2014 @ 13:57
    Sören Deger
    100

    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

  • Craig O'Mahony 364 posts 918 karma points
    Nov 04, 2014 @ 14:07
    Craig O'Mahony
    0

    Ok that's brill. I shall have a read up :)

  • Craig O'Mahony 364 posts 918 karma points
    Nov 06, 2014 @ 11:30
    Craig O'Mahony
    1

    Works for me!

    Cheers Soren

Please Sign in or register to post replies

Write your reply to:

Draft