RSS

LuxCal Forum

The place for questions, suggestions and news about the LuxCal Event Calendar

User:   Password:   Remember Me?   
LuxCal Forum / General / Support / Notification email
Posted:  11 Aug 2010 15:40
Hi,

I'm not sure if this is a problem per se, or a new feature request: I am testing out the email notifications feature by typing: "/[path to]/php /[path to]/notify.php" into a bash terminal.

The terminal responds,
Notifications sent:
1. To: me[at]mydomain.com - Subject: Booking Calendar - Due in 1 day(s): Email notification test
2. To: me[at]mywebmail.com - Subject: Booking Calendar - Due in 1 day(s): Email notification test


I am receiving the second instance to an external, webmail address, but not the first (the same domain the development server is on).

When implementing a "formmail" php script for another project, I did not experience any difficulty when testing emails to myself and other recipients on this domain.

At any rate, would it be possible to have notifications sent on submission of new events, rather than via the nightly cron job method, perhaps by pasting all or some of the "notify.php" code into the new event form?

Thanks!
Posted:  11 Aug 2010 16:52   Last Edited By: Roel B.
Hello,
Your terminal response:
In the first line-of-code in the notify.php script, a variable $sumToAdmin can be set to true or false. If set to true (default) notify.php will, besides sending notification emails, also produce a summary of all messages sent. This summary is the first instance of your Notifications sent. So you can switch this off by setting $sumToAdmin to false in notify.php.
Your last question
There are currently several mechanisms in LuxCal to be notified of events which are due or calendar changes which have taken place:
1. email notification to a specific user for a specific event a specified number of days before the due date and on the due date. This is done through a cron job for notify.php.
2. email notification to a (list of) user(s) specified by the admin with all calendar changes (added/edited/deleted) during the last x days.  This is done through a cron job for sendchg.php.
3. All calendar changes since a certain date. Via the changes view (drop down menu in navigation bar)
4. The last 16 (max) calendar changes since a certain date. Via the RSS-feeds.

For 1 and 2 above the scripts notify.php and sendchg.php can of course also be started via a normal browser link.

To have notifications sent on submission/edition/deletion of new events has currently not been implemented. This should not be too difficult, but the disadvantage is that - for a busy calendar - this could result in quite a number of email messages.

Hope this helps,
Roel
Posted:  11 Aug 2010 17:43
Hi,

Thanks for responding.

I think you misunderstood my first point. When I set up the event, I had it set to notify two different emails (separated by a semicolon in the form field), but I am receiving notifications at the second (webmail) email address only. I am getting error messages in a "/var/mail/[user]" text file that say, "<[user]@[pcname].local>: Sender address rejected: Domain not found (in reply to RCPT TO command)" (note this is on OSX 10.4).

I have staged luxcal to the server where my company web site is hosted, and it does not send any notifications. When I invoke notify.php and sendchg.php from the browser (as you suggested), I am getting: "No notification dates due.", even though I have set up events with notifications to test it.

Thanks
Posted:  11 Aug 2010 18:24   Last Edited By: Roel B.
Hello
Yes, I misunderstood your first point. I have no answer to this. If the sender address is rejected, one would think the calendar email address specified on the Settings page (this email address is used as 'sender') is not valid. However, then why is this only a problem for the first destination email address and not for the second?
The second point:
The message "No notification dates due." is produced by notify.php. This means notify.php doesn't find any event in the database for which a notification should be sent. As said earlier, notifications are only sent twice per event: once the specified number of days before the event is due and once when the event is due. I assume you have entered a correct email address in the event window. Could there be a problem with the time-zone specified on the Settings page?
And what happens when you invoke sendchg.php from the browser, after you have set "Days to look back for changes" on the Settings page to e.g. 30 days?
Roel
Posted:  11 Aug 2010 20:10
Hi,

Both installations I have tested are a bit unorthodox: the first because it was localhost (and the email failure may have been a postfix configuration issue), and the other because I parked the database on a different host (godaddy) from the app.

To eliminate these as possibilities, I am making a fresh test installation on my godaddy space and will let you know if the email problems persist.

Thanks for your help thus far.
Posted:  11 Aug 2010 21:36
And that was exactly the problem. Email notifications are working fine with app & db running from same hosting environment (godaddy in this case).

It still would be great if confirmation emails for adding/changing/deleting events could be sent immediately, as well as by nightly cron jobs.

Thanks!
Posted:  13 Aug 2010 17:25
Hi,

I just did a quick test of 'notify now' functionality. First I added a checkbox to the event form:

http://www.designartcraft.com/notifynow.jpg

line 266 (of the original, unedit) "pages/event.php":

            <input type="checkbox" name="notifynow" value="notifynow" />&nbsp;now&nbsp;and/or&nbsp;

then, the script is inserted at line 153 (same file):

// send confirmation email now (if checked)
        if ($_POST["notifynow"] == "notifynow")    {//send mail now checkbox, line ~271
                $nowbody = "You have booked the following event using the  online calendar:
                Name of Event: {$_POST['title']}
                Venue: {$_POST['venue']}
                Description: {$_POST['description']}
                Date and time:{$_POST['date']}, {$_POST['start_time']} to {$_POST['end_time']}";
               
                mail ($_POST['not_mail'], 'event booked',$nowbody, 'From:admin@calendar.com');
        }


My initial, 'one-off' functional test worked -- can anyone spot any obvious syntax errors or functional issues in my code (I confess to being a php script-kiddie) ?

Thanks!
Posted:  19 Aug 2010 22:13
Hi dsmithhfx,

I like the function of sending mail, is it possible that you send me the script bij email?

corinavdberg@gmail.com
Posted:  19 Aug 2010 22:51   Last Edited By: Roel B.
Hello Corina,
There are more users interested in this function (my wife for instance ;) ).
I will add this function to LuxCal 2.2, which I will release end of next week.
I will use the language files, rather than hard code the English texts.
So waiting a few days could pay off . . .
Roel
Posted:  22 Aug 2010 20:32
Yep that is certain worth it!
Thanks! :D

Corina
Posted:  28 Dec 2010 02:58
Sorry I'm a bit slow in catching up with some of the topics that have been discussed like email distribution lists.  I really like the feature where you can add emails to the "send/notify now" option. However, it is limited to 256 characters and requires retyping emails each time.  Is there a way to set up an distribution list that maybe I missed in one of the forums?  Thanks again for your consideration, Erika
Posted:  18 Jul 2011 22:58
Hi Erika,
In LuxCal 2.4 email distribution lists have been introduced. In the email notification field, email addresses and email distribution lists can be combined.
Roel