Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8043 Posts in 1856 Topics- by 2099 Members - Latest Member: roi
Pages: 1 [2] 3   Go Down
Print
Author Topic: Email notification  (Read 2242 times)
0 Members and 1 Guest are viewing this topic.
Jason S
New Member
*

Karma: 0
Offline Offline

Posts: 3


WWW
« Reply #15 on: April 01, 2002, 01:53:00 PM »

Dave,
The "From" field is not a major issue, but I know sooner or later someone will reply to one.
Logged
June
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #16 on: April 11, 2002, 07:43:00 PM »

Hey David,

I want to make soem changes to this plugin so that it can work for me as a mail confirmation of adding and editing events. Basically any user(username is email address already) adds or edits an event, an email confirmation will be sent to this user only, with the event time, title included in the email body.

Could you give me some suggestion on how to make it?

Thanks for the nice plugin.

------------------

Logged
TubaDave
New Member
*

Karma: 0
Offline Offline

Posts: 0

Student


WWW
« Reply #17 on: April 12, 2002, 02:47:00 AM »

Hey, I'm trying to figure out what the use of an email confirmation system is with this script, since the user has to login (providing a password to prove their identity)before they can add an event anyway.  I mean, what exactly are you trying to protect against that the current password scheme doesn't?

Here's the way you'd have to do it.

1) change after_add_event to after_schedule_event (filename and subroutine name).

2) You then have access to $User->{username} for the email address, and you can use these to get the schedule and details of the event (they return a reference to a hash containing all the information in $EVENT in the templates:

$db = new DBFile($schedule_db);
$schedule = $db->getRecord( {'event_id'=>$event_id} );
$db = new DBFile($events_db);
$details = $db->getRecord( {'id'=>$event_id} );

3) Then you can send the email to the person with a link back to the calendar_admin.pl like this:
http://www.yoursite.com/cgi-bin/calendar_admin.pl?command=confirm&id=event_id

4) Notice I used the command confirm.  This means you need to write another plugin file (command_confirm) which does the same thing as the approve function in calendar_admin.pl, only doesn't require APPROVE permissions and has no visual interface except for the email links.

Notice that if someone can get past the password protection of the script, this setup really won't do much good.  All I can think of to increase security (which I guess is the reason you are confirming events in the first place) would be to send a randomly generated password in the link in the email, and save that password encrypted in an extra field in the events database.  Then only allow the command_confirm function to keep running if the encrypted version of the password sent back to you through the link is equal to the one in the database.

Hope that got your creative juices flowing.  Let me know if you need more details.

------------------
David Whittaker
http://www.uabcm.com/
http://www.csworkbench.com/

Logged

June
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #18 on: April 12, 2002, 07:21:00 PM »

Hey David,

Sorry my previous post was a little confusing. Actually what I meant was not to increase security, probably I should not have used the word 'confirmation', the email should just work as a reminder to the user that they've added or edited an event.

I want to use this calendar tool for a reservation system we maintains. Users log on to it and pick a resource(pick a calendar) we have and make a reservation(all the events are auto approved). Every time a user makes a reservation or changes a reservation, I want to have an email sent to this user automatically as a record for him and maybe a reminder to him of his reservation.

This is pretty similar to this plugin, therefore I post it here just to get some of your suggestions. The more details the better..;-)

Thanks a lot

------------------

Logged
TubaDave
New Member
*

Karma: 0
Offline Offline

Posts: 0

Student


WWW
« Reply #19 on: April 12, 2002, 10:14:00 PM »

Ah.  That makes much more sense.  Well, step 1 and 2 would work for you, then.  One thing I left out, was that you don't have access to $event_id, but you do have access to $in{'EVENT_id'}, which contains the id of the event.  Then you can use those four lines of code above to get at the event details and schedule.

One thing to note, if you don't mind waiting until I have a few less projects, EmailNotify2 will have that functionality and more.  You can pick which events (as in adding, editing, or approving, not calendar events) will send an email.  Then each user can decide whether or not they recieve an email for a specific event (or the administrators can decide for them).  With the combination of a modified AutoRegister plugin (I'll modify it to set email preferences for the new user as well) and EmailNotify2, you can have a system where a user signs themselves up, then recieves email every time they add an event, edit that event, and optionally, a few hours (or days) before the event occurs.  I will work on that plugin every time I get a chance, but no guarantees on when it will be available.  Tentatively, though, I'm saying the end of the month if my schedule doesn't get any worse.

------------------
David Whittaker
http://www.uabcm.com/
http://www.csworkbench.com/

Logged

June
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #20 on: April 16, 2002, 02:06:00 PM »

My email notification works now. I like the idea of receiving email a few hours (or days) before the event occurs. Can't wait trying out the EmailNotify2.

Thanks for providing us these great functions.

------------------

Logged
jwixted
New Member
*

Karma: 0
Offline Offline

Posts: 0

Systems Admin


WWW
« Reply #21 on: May 02, 2002, 09:05:00 AM »

Hi, Dave!

Just wanted to check on your progress with EmailNotify2... One of the things I'm looking for is to have the guts of the event listed in the admin notify of an event.  For now, I want to know when an event has been added (to make sure "Jack's Birthday" kinds of things don't appear).  If all that info were in the e-mail, I wouldn't have to pop out there, log in, view the calendar, find the new entry, etc, etc....

Thanks for some REALLY great scripts!

  -Joe

------------------

Logged
GotMyPT
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #22 on: July 04, 2002, 10:58:00 PM »

Any ideas why this doesn't work? I've tried both:

/usr/sbin/sendmail

and

sendmail

I can see the plugin in my admin screen (of course, or else I couldn't change the mail path) so it's installed correctly. But no mail ever shows up.

There is another script that I run on my site, I'm sure you all have heard of it, the ever popular formmail by Matt Wright. This is a c&p from that script:

code:
# $mailprog defines the location of your sendmail program on your unix system.#

$mailprog = '/usr/sbin/sendmail';


and my formmail works perfectly, and you can see that the path is the same as I've tried above. I don't get it.

Anyone have any ideas?

GREATLY APPRECIATED

------------------

Logged
GotMyPT
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #23 on: August 10, 2002, 03:47:00 PM »

Well now that 3.2 is out and it doesn't have support for email noticications, I'd REALLY like to get this to work.

Can anyone who understands what might be going on here please offer me some insights? TubaDave, do you have any ideas what might be going wrong?

I see that others are using the plug-in with success...

Greatly appreciated!!!
Claudia

------------------

Logged
Jason S
New Member
*

Karma: 0
Offline Offline

Posts: 3


WWW
« Reply #24 on: August 12, 2002, 08:41:00 AM »

If the formmail is working using /usr/sbin/sendmail I can think of no reason why the Email notification won't work.  Are you sure the pluging was uploaded in ASCII mode and that you're FTP program did not change it in any way.

Jason S

Logged
kayleigh
New Member
*

Karma: 0
Offline Offline

Posts: 0

Computer Analyst


WWW
« Reply #25 on: August 12, 2002, 12:35:00 PM »

You might have to re-enable you plugins. I didn't install the upgrade - I just installed the full version along side 31.

------------------
Stephanie Meemken
Webmaster, Minnesota Jaycees

http://www.mnjaycees.org/

Logged

Stephanie Meemken
Webmaster, Minnesota Jaycees

http://www.mnjaycees.org/
GotMyPT
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #26 on: August 14, 2002, 11:16:00 AM »

Thanks Jason S and Kayleigh for the replies!

Still not working. Jason, I reinstalled making sure to send in ASCII mode and permissions are 777. The plug in shows up just fine in my Plug-In screen. I can change the parameters there, just no mail shows up. I've tested it with a user that is strictly a quest, and a user with 'approve own events' permission.

I'm wondering if its action could be getting interference with one of my other plugins. I don't know Perl and I don't know how David Whittaker's plugins interact with each other. This is how my plugins folder looks:

DeleteOld (dir)
EmailNotify (dir)
OneClick (dir)
redirect (dir)
after_schedule_event.pl
command_list.txt
permissions_list.txt
plugin_files.txt
plugins.txt

Since there are several things that happen 'after_add_event' by all these different scripts (I've peeked at the code, trying to discover something), can one be making the other not run? I'm just trying to understand what's happening here, someone with the expertise answer me this: If the Redirect takes control 'after_add_event' could it be that the sendmail never gets executed, its 'after_add_event' (which send the mail to me) never happens? It gets skipped over so to speak.

Is anyone else who is running EmailNotify effectively also running the other plugins as I am?

TubaDave? Can you shed any light on this?

Thank you!
Claudia

------------------

Logged
Keith G
Guest
« Reply #27 on: August 14, 2002, 12:04:00 PM »

I would try disabling OneClick and see if it starts working then. Some of the other plugins do not work with OneClick enabled. Under the Manage Plugins menu the order I have is NoOverlap, Redirector, then Email Notify. The email actually gets sent after finishing the first screen of the add event field after hitting the save and continue button. I have tried to get OneClick to work with NoOverlap and Redirector but have not had any luck. The way I have it set up now these three will work together.
 There is an exception though. I have calendars where overlaps are acceptable and some where they are not. On calendars where I have NoOverlap turned off it skips the NoOverlap plugin and therefore misses the Redirector hook so Redirector does not work in these instances.
 I really would like to get OneClick, Redirector, NoOverlap and Email Notify all to work together but have not had any luck. The best I can do is disable OneClick as the NoOverlap and EmailNotify are more important.
  I did have to rename one of the after_schedule_event functions to get this to work. Let me know if you need more detail on this, or just search this forum for NoOverlap and Redirector as key words.
  Anyone know if and when EmailNotify2 will be available and whether it might fix some of these problems?
             Keith
Logged
Jason S
New Member
*

Karma: 0
Offline Offline

Posts: 3


WWW
« Reply #28 on: August 15, 2002, 08:38:00 AM »

If you are using the Oneclick add screen you will need to add a line of code to the "command_add_oneclick_event.pl" file in the Oneclick folder. About half way down the screen you will see this:

$properties->{'author_id'} = $User->{'username'};
   $properties->{'author_name'} = $User->{'name'};
   $properties->{'time_added'} = time;
   if ($User->hasPermission("","APPROVE") | | $User->hasPermission($calendar,"APPROVE_OWN_EVENTS")) {
      $properties->{'approved'} = 1;
      }
   else {
      &addUserMessage(&getMessage("EVENT_SAVED_PENDING_APPROVAL"));
      &handleCustomFunction("after_add_event");
      }

The line you add is the last on (&handleCustom Function...).

I have gotten it to work with oneclick & redirector enabled.  The no overlap was giving me errors.  i will continue to look at it and post here if I get it to work.

[This message has been edited by Jason S (edited August 15, 2002).]

Logged
Jacob Williams
Guest
« Reply #29 on: December 20, 2004, 07:59:00 PM »

I went to http://www.csworkbench.com/CSMods/EmailNotify.tar.gz
suposely the url to get the plugin to send an email notice when something added to my calendar. At that url I get the message the "page cannot be displayed".  I am not a member yet, my email is jacob@hopearkansas.com.  Can someone tell me how to get the plugin, or where I can get a plugin to send me an email when new item added to my calendar? Thank you very much

Jacob

Logged
Pages: 1 [2] 3   Go Up
Print
Jump to: