Testing digest notifications

Author Message

Nathan Sharp

Monday 21 March 2005 4:58:35 pm

Hi, I've been having a great time playing around with a new site using ezPublish and have just gotten around to working on the notification e-mails. Is there a simple/easy way to force a send of a digest e-mail for testing? Having to only do 1 test per day will be slow to debug ;-)

Frederik Holljen

Wednesday 23 March 2005 1:40:03 am

Hm.. I don't quite get you. You can run the cronjob so you send out notification much more often that once a day.

Nathan Sharp

Wednesday 23 March 2005 7:07:25 pm

Perhaps I am confused also. I do run the cron job every 15 minutes, but the whole point of the digest format is that it only goes out once per day. How can I force it to go out now, even though it would normally wait until tonight so that I can debug it?

James Robertson

Wednesday 04 October 2006 3:49:06 pm

Edit eznotificationcollection_item.send_date DB field of the record you wish to send so that it is some time in the past (eg. 0).

Nathan Sharp

Monday 16 October 2006 12:55:15 pm

Thanks for the idea! It sounds like what I need. Next time I am messing with the templates, I will try it.

Petr Mifek

Tuesday 24 July 2007 2:09:24 am

That works, but at least as of 3.9.x, you can't set 0 - this won't work. You must use ie. "1". See kernel/classes/notification/eznotificationcollectionitem.php:

    function fetchByDate( $date )
    {
        return eZPersistentObject::fetchObjectList( eZNotificationCollectionItem::definition(),
                                                    null, array( 'send_date' => array( '<', $date ),
                                                                 'send_date' => array( '!=', 0 ) ) , null,null,
                                                    true );
    }

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.