Index: /branches/2.2/filemanager/setup/phpgw_pt-br.lang
===================================================================
--- /branches/2.2/filemanager/setup/phpgw_pt-br.lang	(revision 3386)
+++ /branches/2.2/filemanager/setup/phpgw_pt-br.lang	(revision 3415)
@@ -179,3 +179,8 @@
 who	filemanager	pt-br	Quem
 you do not have access to %1	filemanager	pt-br	Você não tem acesso a %1
-your home dir did not exist, created a new one.	filemanager	pt-br	Seu Diretório Home não existia, foi criado um novo.
+Your Home Dir did not exist, eGroupWare created a new one.	filemanager	pt-br	Seu Diretório Home não existia, foi criado um novo.
+Filemanager notification	filemanager	pt-br	Gerenciador de arquivos notifica
+The user %1, sent the file "%2" (type %3) and asked to notify you.	filemanager	pt-br	O usu&aacute;rio %1, enviou o arquivo "%2" (tipo %3) e solicitou o notificar.
+Comments by user: %1	filemanager	pt-br	Coment&aacute;rios do usu&aacute;rio: %1
+The file can be accessed by: %1	filemanager	pt-br	O arquivo pode ser acessado pelo endere&ccedil;o: %1
+Send Notification email to:	filemanager	pt-br	Enviar email de notifica&ccedil;&atilde;o a:
Index: /branches/2.2/filemanager/inc/upload.php
===================================================================
--- /branches/2.2/filemanager/inc/upload.php	(revision 3019)
+++ /branches/2.2/filemanager/inc/upload.php	(revision 3415)
@@ -18,4 +18,5 @@
 $upload_max_size = $current_config['filemanager_Max_file_size'];
 $path = $_POST['path'];
+$notifUser = $_POST['notifTo'];
 $show_upload_boxes = count($_FILES['upload_file']['name'])-1;
 
@@ -183,4 +184,34 @@
 		}
 	}
+
+if(count($notifUser) > 0)
+{
+	define('PHPGW_INCLUDE_ROOT','../../');
+	define('PHPGW_API_INC','../../phpgwapi/inc');
+	include_once(PHPGW_API_INC.'/class.phpmailer.inc.php');
+	$mail = new PHPMailer();
+	$mail->IsSMTP();
+	$boemailadmin = CreateObject('emailadmin.bo');
+	$emailadmin_profile = $boemailadmin->getProfileList();
+	$emailadmin = $boemailadmin->getProfile($emailadmin_profile[0]['profileID']);
+	$mail->Host = $emailadmin['smtpServer'];
+	$mail->Port = $emailadmin['smtpPort'];
+	$mail->From = $GLOBALS['phpgw']->preferences->values['email'];
+	$mail->FromName = $GLOBALS['phpgw_info']['user']['fullname'];
+	$mail->IsHTML(true);
+	foreach ($notifUser as $userMail)
+	{
+		$mail->AddAddress($userMail);
+		$mail->Subject = lang("Filemanager notification");
+		$mail->Body = lang("The user %1, sent the file \"%2\" (type %3) and asked to notify you.",$GLOBALS['phpgw_info']['user']['fullname'],$_FILES['upload_file']['name'][0],$_FILES['upload_file']['type'][0])."<br>";
+		$mail->Body .= lang("Comments by user: %1",$_POST['upload_comment'][0])."<br>";
+		$mail->Body .= lang("The file can be accessed by: %1","<a href=\"".$GLOBALS['phpgw']->link("index.php").">link</a><br>");
+//		$mail->Body .= lang("The file can be accessed by: %1","<a href=\"".$GLOBALS['phpgw']->link("../index.php","menuaction=filemanager.uifilemanager.view&file=" . urlencode(base64_encode($_FILES['upload_file']['name'][0]))."&path=".urlencode(base64_encode($path)))."\">link</a><br>");
+		if(!$mail->Send()) {
+			$return[] = $mail->ErrorInfo;
+		}
+	}
+}
+
 if (count($return) > 0){
 		$_SESSION['response'] = serialize($return);
Index: /branches/2.2/filemanager/js/common_functions.js
===================================================================
--- /branches/2.2/filemanager/js/common_functions.js	(revision 3408)
+++ /branches/2.2/filemanager/js/common_functions.js	(revision 3415)
@@ -307,4 +307,16 @@
 }
 
+function sendNotification(){
+	var winEl = document.getElementById('uploadOption').parentNode;
+	var emailTo = document.createElement("INPUT");
+	emailTo.name="notifTo[]";
+	emailTo.type="text";
+	emailTo.size="38";
+	var labelTo = document.createElement("SPAN");
+	labelTo.innerHTML = get_lang("Send Notification email to:");
+	winEl.insertBefore(labelTo,document.getElementById('uploadOption'));
+	winEl.insertBefore(emailTo,document.getElementById('uploadOption'));
+}
+
 function sendFiles(){
 		cExecuteForm_(document.getElementById('form_up'),handler.upload);
Index: /branches/2.2/filemanager/templates/default/upload.tpl
===================================================================
--- /branches/2.2/filemanager/templates/default/upload.tpl	(revision 3367)
+++ /branches/2.2/filemanager/templates/default/upload.tpl	(revision 3415)
@@ -7,4 +7,5 @@
 		<td><strong>{lang_file}</strong></td>
 		<td><strong>{lang_comment}</strong></td>
+		<td></td>
 	</tr>
 <!-- END upload_header -->
@@ -14,4 +15,5 @@
 	<td><input onchange="javascript:addNewInput();" maxlength="255" name="upload_file[]" type="file"></td>
 	<td><input name="upload_comment[]" type="text"></td>
+	<td><img src="filemanager/images/mail.png" alt="Send email" title="Send email" onclick="sendNotification();"></td>
 	</tr>
 <!-- END row -->
