I got the Split recurring plugin to work with the Emailnotify2 plugin but it is not perfect. I moved the Split Recurring above the EmailNotify in the plug-ins list then modified the two file like below.
To the after_schedule_event.pl in the Split Recurring directory I added this to the very end a line above the 1;
------------------------------------------
unshift @INC, $BASE_DIR."plugins/EmailNotify2/";
require "EmailUtil.inc";
my $db = new DBFile($events_db);
my $event = $db->getRecord( {'id' => $in{EVENT_id} } );
&AddEventToDB($event, ($email_was_edit ? "edit" : "add"), $calendar);
--------------------------------------------
This modification works fine.
The second file to modify is the command_delete_all_events.pl in the Split recurring directory. Again add the following lines before the 1;
--------------------------------------------
unshift @INC, $BASE_DIR."plugins/EmailNotify2/";
require "EmailUtil.inc";
my $edb = new DBFile($events_db);
my $sdb = new DBFile($schedule_db);
my $event = $edb->getRecord( {'id' => $in{EVENT_id} } );
my $scheds = $sdb->getRecords( {'event_id' => $in{EVENT_id} } );
my $save_db_dir = $BASE_DIR."plugins/EmailNotify2/db/";
$edb = new DBFile($save_db_dir."deleted_events");
$sdb = new DBFile($save_db_dir."deleted_schedule");
if (!$edb->getRecord( {'id' => $in{EVENT_id}, 'calendar' => $calendar } ) )
{
$event->{calendar} = $calendar;
$event->{event_id} = $event->{id};
$edb->addRecord($event); #addRecord gets it's own id, so we have to save the event_id in another variable.
$event->{id} = $event->{event_id}; #we store it back in the id field for AddEventToDB's benefit (so it will match adding any other type of event)
foreach $sched (@$scheds)
{
$sched->{calendar} = $calendar;
$sdb->addRecord($sched);
}
}
&AddEventToDB($event, "delete", $calendar);
---------------------------------------------
This works but when you delete "related events" only one of the events gets sent as an administrative email "not all the related events". So if you are deleting 5 events and you check the box to "delete related events" they will all delete OK but youe administrative email you receive will only show the one event. Like I said this works but is not perfect.
------------------