Index: branches/2.2.0.1/calendar/setup/tables_current.inc.php
===================================================================
--- branches/2.2.0.1/calendar/setup/tables_current.inc.php	(revision 4128)
+++ branches/2.2.0.1/calendar/setup/tables_current.inc.php	(revision 4217)
@@ -27,4 +27,5 @@
 				'title' => array('type' => 'varchar','precision' => '300','nullable' => False,'default' => '1'),
 				'description' => array('type' => 'text','nullable' => True),
+                                'notifications_owner' => array('type' => 'int','precision' => '1','nullable' => False,'default' => '0'),
 				'observations' => array('type' => 'text','nullable' => True),
                                 'attachment' => array('type' => 'text','nullable' => True),
Index: branches/2.2.0.1/calendar/setup/tables_update.inc.php
===================================================================
--- branches/2.2.0.1/calendar/setup/tables_update.inc.php	(revision 4186)
+++ branches/2.2.0.1/calendar/setup/tables_update.inc.php	(revision 4217)
@@ -83,5 +83,6 @@
 	function calendar_upgrade2_2_000()
 	{
-	    $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cal ADD COLUMN observations text");
+	    $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cal ADD COLUMN notifications_owner INT NOT NULL deafult '0'");
+            $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cal ADD COLUMN observations text");
 	    $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cal ADD COLUMN alter_by varchar(160)");
 	    $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cal ADD COLUMN attachment text");
Index: branches/2.2.0.1/calendar/inc/class.bocustom_fields.inc.php
===================================================================
--- branches/2.2.0.1/calendar/inc/class.bocustom_fields.inc.php	(revision 3976)
+++ branches/2.2.0.1/calendar/inc/class.bocustom_fields.inc.php	(revision 4217)
@@ -34,5 +34,6 @@
 			'observations' => 'Observations',
 			'alter_by'   =>  'Alter by',
-                        'attachment' => 'attachment'
+                        'attachment' => 'attachment',
+                        'notifications_owner' => 'notifications_owner'
 		);
 
Index: branches/2.2.0.1/calendar/inc/class.bocalendar.inc.php
===================================================================
--- branches/2.2.0.1/calendar/inc/class.bocalendar.inc.php	(revision 4159)
+++ branches/2.2.0.1/calendar/inc/class.bocalendar.inc.php	(revision 4217)
@@ -1186,7 +1186,8 @@
 					$this->so->set_category(strval($l_categories[0]));
 				}
-				$this->so->set_title($l_cal['title']);
+ 				$this->so->set_title($l_cal['title']);
 				$this->so->set_description($l_cal['description']);
 				$this->so->set_observations($l_cal['observations']);
+                                $this->so->set_notifications_owner($l_cal['notifications_owner']);
                                 $this->so->set_attachment($l_cal['attachment']);
 				$this->so->set_ex_participants($l_cal['ex_participants']);
@@ -3110,7 +3111,16 @@
 
 			$GLOBALS['phpgw_info']['user']['preferences'] = $GLOBALS['phpgw']->preferences->create_email_preferences();
-			$sender = $GLOBALS['phpgw_info']['user']['email'];
-
-			$temp_tz_offset = $this->prefs['common']['tz_offset'];
+			$preferences = CreateObject('phpgwapi.preferences',(int)$this->owner);
+                        $GLOBALS['phpgw']->accounts->get_account_name((int)$owner,$lid,$fname,$lname);
+
+                        if($new_event['notifications_owner'] == '1'){
+                            $sender = $preferences->email_address((int)$owner);
+                            $sender_name = $fname.' '.$lname;
+                        }else{
+                            $sender = $GLOBALS['phpgw_info']['user']['email'];
+                            $sender_name = $GLOBALS['phpgw_info']['user']['fullname'];
+                        }
+
+                        $temp_tz_offset = $this->prefs['common']['tz_offset'];
 			$temp_timeformat = $this->prefs['common']['timeformat'];
 			$temp_dateformat = $this->prefs['common']['dateformat'];
@@ -3252,5 +3262,5 @@
 					continue;	// dont notify rejected participants
 				}
-				if($userid != $GLOBALS['phpgw_info']['user']['account_id'] ||  $msg_type == MSG_ALARM || isset($new_event['attachment']))
+				if($userid != $owner ||  $msg_type == MSG_ALARM || isset($new_event['attachment']))
 				{
 					print_debug('Msg Type',$msg_type);
@@ -3512,5 +3522,5 @@
                                         $mail->Body .= "\n--01BD3665.3AF0D360--\n";
                                         $mail->From = $sender;
-					$mail->FromName = $GLOBALS['phpgw_info']['user']['fullname'];
+					$mail->FromName = $sender_name;
 					$mail->Sender = $mail->From;
 					$mail->SenderName = $mail->FromName;
@@ -3605,5 +3615,5 @@
                                 
 				$mail->From = $sender;
-				$mail->FromName = $GLOBALS['phpgw_info']['user']['fullname'];
+				$mail->FromName = $sender_name;
 				$mail->Sender = $mail->From;
 				$mail->SenderName = $mail->FromName;
@@ -3662,5 +3672,5 @@
 				$mail->Port = $emailadmin['smtpPort'];
 				$mail->From = $sender;
-				$mail->FromName = $GLOBALS['phpgw_info']['user']['fullname'];
+				$mail->FromName = $sender_name;
 				$mail->Sender = $mail->From;
 				$mail->SenderName = $mail->FromName;
Index: branches/2.2.0.1/calendar/inc/class.socalendar__.inc.php
===================================================================
--- branches/2.2.0.1/calendar/inc/class.socalendar__.inc.php	(revision 3976)
+++ branches/2.2.0.1/calendar/inc/class.socalendar__.inc.php	(revision 4217)
@@ -107,4 +107,9 @@
 		}
 
+                function set_notifications_owner($notifications_owner='')
+		{
+			$this->add_attribute('notifications_owner',$notifications_owner);
+		}
+
 		function set_alter_by($alter_by='')
 		{
Index: branches/2.2.0.1/calendar/inc/class.socalendar_sql.inc.php
===================================================================
--- branches/2.2.0.1/calendar/inc/class.socalendar_sql.inc.php	(revision 4147)
+++ branches/2.2.0.1/calendar/inc/class.socalendar_sql.inc.php	(revision 4217)
@@ -570,4 +570,5 @@
 				$this->set_description(stripslashes($GLOBALS['phpgw']->strip_html($this->stream->f('description'))));
 				$this->set_observations(stripslashes($GLOBALS['phpgw']->strip_html($this->stream->f('observations'))));
+                                $this->set_notifications_owner(stripslashes($GLOBALS['phpgw']->strip_html($this->stream->f('notifications_owner'))));
 				$this->set_alter_by(stripslashes($GLOBALS['phpgw']->strip_html($this->stream->f('alter_by'))));
                                 $this->set_attachment(stripslashes($GLOBALS['phpgw']->strip_html($this->stream->f('attachment'))));
@@ -986,4 +987,5 @@
 					. "description='".$this->stream->db_addslashes($event['description'])."', "
 					. "observations='".$this->stream->db_addslashes($event['observations'])."', "
+                                        . 'notifications_owner='.(int)$event['notifications_owner'].','
                                         . "attachment='".$this->stream->db_addslashes($sattach)."', "
 					. "alter_by='".$this->stream->db_addslashes($GLOBALS['phpgw_info']['user']['fullname'])."', "
Index: branches/2.2.0.1/calendar/inc/class.uicalendar.inc.php
===================================================================
--- branches/2.2.0.1/calendar/inc/class.uicalendar.inc.php	(revision 4195)
+++ branches/2.2.0.1/calendar/inc/class.uicalendar.inc.php	(revision 4217)
@@ -6015,5 +6015,5 @@
 			}
 
-// Reminder
+                        // Reminder
 			// The user must use "Alarm Management" to change/modify an alarm
 			// so only display the email reminder fields if this is a new event
@@ -6097,4 +6097,24 @@
 				'data'	=> '<select name="cal[recur_type]">'."\n".$str.'</select>'."\n"
 			);
+
+
+                        $preferences = CreateObject('phpgwapi.preferences',(int)$this->owner);
+                       $selected_creator = $selected_owner = '';
+                       if($event['notifications_owner'] == 1)
+                           $selected_owner = ' selected';
+                       else
+                           $selected_creator = ' selected';
+                      
+                       $option = '<option value="0" '.$selected_creator.' >'.$GLOBALS['phpgw']->common->grab_owner_name((int)$_SESSION['phpgw_session']['account_id']).'</option>';
+                       if($_SESSION['phpgw_session']['account_id'] != $event['owner']){
+                           $option .= '<option value="1" '.$selected_owner.' >'.$GLOBALS['phpgw']->common->grab_owner_name((int)$event['owner']).'</option>';
+                       }
+
+
+                       $var['notifications_owner'] = Array(
+				'field'	=> lang('Send notificatios as'),
+				'data'	=> '<select name="cal[notifications_owner]" >'.$option.'</select>'
+			);
+
 
 			if($event['recur_enddate']['year'] != 0 && $event['recur_enddate']['month'] != 0 && $event['recur_enddate']['mday'] != 0)
Index: branches/2.2.0.1/calendar/inc/class.socalendar.inc.php
===================================================================
--- branches/2.2.0.1/calendar/inc/class.socalendar.inc.php	(revision 4024)
+++ branches/2.2.0.1/calendar/inc/class.socalendar.inc.php	(revision 4217)
@@ -380,4 +380,9 @@
 		}
 
+                function set_notifications_owner($notifications_owner='')
+		{
+			$this->cal->set_notifications_owner($notifications_owner);
+		}
+
 		function set_ex_participants($ex_participants='')
 		{
