scheduling1Add my vote for this tag syndication1Add my vote for this tag tracker_apps1Add my vote for this tag create new tag
, view all tags

Mail Reminder Plugin (version 1.000)

The MailReminderPlugin handles the tag %MAILREMINDER_PLUGIN% that inserts a monthly calendar in the page and It allows you to send reminders before those events. It is the extension of Calendar Plugin. I have modified the existing code of Calendar Plugin so as to enable it to send reminders befores the date of event. A mail is send before the event to remind the calendar user, Which is sent at email id specified. We use cronjob , which will be invoked at 00:01 am and will compare today's date with the reminer date of events and send mail to the appropriate users whose reminder date matches with today's date.

Usage example

You type:You get:If correctly installed:
Following are the configurations for user name and email address. just copy into your page ;

+ Name = YOUR NAME

+ email = yourid@domainPLEASENOSPAM.com

+ reminder = 3

( Reminder tells the no. of days before the event it should send email )

Specify list of events as following using bullets:

  • 2 Feb - Andrea's birthday
  • 7 Mar - Nicoletta's birthday
  • 29 May 1996 - Maria Teresa is born!
  • 29 Sep 1998 - Davide is born!

To delete the events from reminder list present in the database

- 29 Sep 1998 - Davide is born!

%MAILREMINDER_PLUGIN{month="2" year="2002" bgcolor="cyan"}% %MAILREMINDER_PLUGIN{month="3" year="2002" showweekdayheaders="1"}%

February 2002
Andrea's birthday 
10  11  12  13  14  15  16 
17  18  19  20  21  22  23 
24  25  26  27  28     

March 2002
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
Nicoletta's birthday 
10  11  12  13  14  15  16 
17  18  19  20  21  22  23 
24  25  26  27  28  29  30 

%MAILREMINDER_PLUGIN{month="2" year="2002" bgcolor="cyan"}% %MAILREMINDER_PLUGIN{month="3" year="2002" showweekdayheaders="1"}%


You type you get
%MAILREMINDER_PLUGIN% a monthly calendar for the current month/year, with events taken from the current topic
%MAILREMINDER_PLUGIN{<attributes>}% is the full syntax

User settings Event settings and Setting to delete event from database - Syntax

User set the Various information parameters as follows:

Command type Syntax Example
Specify Name :    + Name = YOUR NAME + Name=Naval
Specify email :    + email= Yourid@yourdomain   + email = naval@itPLEASENOSPAM.iitb.ac.in
Reminder before days :    + reminder = number of days before the event   + reminder=3
Specify event:    * dd MMM yyyy - description * 09 Dec 2002 - Expo
Delete event:    - dd MMM yyyy - description - 09 Dec 2002 - Influence 02

Default settings

  • One line description, shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Show a monthly calendar with highlighted events
  • How the cell content is formatted
      * Set FORMAT = $old <br /> $description
  • Note: You can add settings of any of the recognized attributes (in upper case like SHOWWEEKDAYHEADERS)

Plugin Installation Instructions

Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.

  • Download the ZIP file from the Plugin web (see below)
  • The Plugin uses the HTML::CalendarMonthSimple and Date::Calc CPAN packages (see http://www.cpan.org)
    • Install Date::Calc
    • Install HTML::CalendarMonthSimple
    • Install Mail::SendEasy
    • Install perl's DBI module
    • Change line 197 of CalendarMonthSimple.pm as follows to avoid an annoying log message:
      if ($self->year = $todayyear && $self->month = $todaymonth <font color="red">&& defined $thisday</font> && $thisday = $todaydate)=

  • Unzip MailReminderPlugin.zip in your twiki installation directory. Content:
    File: Description:
    data/TWiki/MailReminderPlugin.txt Plugin topic
    data/TWiki/MailReminderPlugin.txt,v Plugin topic repository
    lib/TWiki/Plugins/MailReminderPlugin.pm Plugin Perl module
    lib/TWiki/Plugins/MailReminderPlugin/cron.pl Plugin Perl module
    lib/TWiki/Plugins/MailReminderPlugin/config_file Plugin configruraion file
    lib/TWiki/Plugins/MailReminderPlugin/calender_config_file Plugin configruraion file
    pub/TWiki/MailReminderPlugin/exclam.gif Image file

Create Table to store events in my database

Structure of table is as follows:

Field Type Null Key
name varchar(30) YES  
e_date date   PRI
r_date date YES  
email_id varchar(100)   PRI
event varchar(200)   PRI

Mysql query to create table is :

Create table caltab(name varchar(30), e_date date not Null ,r_date date, email_id varchar(100) not Null, event varchar(200) not Null, primary key(e_date, event, email_id));

Edit cront tab as follows to make entry for cronjob :

In shell prompt execute :- crontab -e [Enter]

  • Vi editor will be opened make the following crontab entry and save the file:-
  • 01 00 * * * /[path of your lib/TWiki/Plugin directory]/MailReminderPlugin/cron.pl

Make changes in configuration files

  • In /[Path of Plugins Directory]/MailReminderPlugin/calender_config_file :- Should be configured with various database related settings like database host ,database user , database password , database name.
  • In /[Path of Plugins Directory]/MailReminderPlugin/config_file :- Should be configured with various database settings and mail related settings like Smtp server name , email of sender etc.

Plugin Info

Plugin Author: TWiki:Main/AshishNaval
Plugin Version: V1.000 (03 Nov 2004)
Change History:  
03 Nov 2004: Initial version
CPAN Dependencies: CPAN:HTML::CalendarMonthSimple >= v1.23, CPAN:Date::Calc, CPAN:Mail::SendEasy, CPAN:DBI
Other Dependencies: none
Perl Version: 5.000 and up
TWiki:Plugins/Benchmark: GoodStyle nn%, FormattedSearch nn%, MailReminderPlugin nn%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/MailReminderPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/MailReminderPluginDev

Related Topics: TWikiPreferences, TWikiPlugins

-- TWiki:Main/AshishNaval - 03 Nov 2004

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatmd5 MailReminderPlugin.md5 r2 r1 manage 0.2 K 2008-12-12 - 11:44 SopanShewale checksum file , Uploaded as a part of Release Process
Compressed Zip archivetgz MailReminderPlugin.tgz r2 r1 manage 11.7 K 2008-12-12 - 11:43 SopanShewale See MailReminderPlugin for details. Untar and run the installer script, Uploaded as a part of Release Process
Compressed Zip archivezip MailReminderPlugin.zip r3 r2 r1 manage 15.0 K 2008-12-12 - 11:44 SopanShewale See MailReminderPlugin for details. Unzip and run the installer script , Uploaded as a part of Release Process
Unknown file formatEXT MailReminderPlugin_installer r2 r1 manage 3.6 K 2008-12-12 - 11:44 SopanShewale Installer Script, Uploaded as a part of Release Process
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2008-12-12 - SopanShewale
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.