Index: trunk/mobile/setup/phpgw_pt-br.lang
===================================================================
--- trunk/mobile/setup/phpgw_pt-br.lang	(revision 691)
+++ trunk/mobile/setup/phpgw_pt-br.lang	(revision 1453)
@@ -1,4 +1,5 @@
 Calendar	mobile	pt-br	Agenda
 contact center	mobile	pt-br	Endereços
+Do you like to delete this message?	mobile	pt-br	Deseja excluir esta mensagem?
 download attachs	mobile	pt-br	Deseja baixar anexos em e-mails?
 Download	mobile	pt-br	Baixar
@@ -36,5 +37,5 @@
 Start Date/Time	mobile	pt-br	Data/Hora Início
 End Date/Time	mobile	pt-br	Data/Hora Término
-schedule	mobile	pt-br	Agendar
+hedule	mobile	pt-br	Agendar
 continue scheduling	mobile	pt-br	Continuar o agendamento
 already_addeds:	mobile	pt-br	Já adicionados:
@@ -58,4 +59,5 @@
 alarm	mobile	pt-br	Alarme
 To Delegate	mobile	pt-br	Delegar
+The message was moved to trash	mobile	pt-br	A mensagem foi movida para a lixeira.
 What is the maximum number of messages per page?	mobile	pt-br	Qual o número máximo de mensagens por página?
 Option	mobile	pt-br	Opção
Index: trunk/mobile/inc/class.ui_mobilemail.inc.php
===================================================================
--- trunk/mobile/inc/class.ui_mobilemail.inc.php	(revision 691)
+++ trunk/mobile/inc/class.ui_mobilemail.inc.php	(revision 1453)
@@ -27,4 +27,6 @@
 			//'reply_msg'	=> True,
 			'new_msg'	=> True,
+			'delete_msg'	=> True,
+			'confirm_delete_msg'	=> True,
 		);
 
@@ -186,8 +188,9 @@
 
 			$p->set_var('reply_text', lang("Reply"));
+			$p->set_var('Delete', lang("Delete"));
 			$msg_number = $_GET['msg_number'];
 			$msg_folder = $_GET['msg_folder'];
 			$p->set_var('reply', "index.php?menuaction=mobile.ui_mobilemail.new_msg&msg_number=$msg_number&msg_folder=$msg_folder");
-
+			$p->set_var('delete', "index.php?menuaction=mobile.ui_mobilemail.confirm_delete_msg&msg_number=$msg_number&msg_folder=$msg_folder");
 			if (!empty($msg['attachments']) && !empty($msg['attachments']['names']))
 			{
@@ -824,20 +827,51 @@
 		}
 
-
-
-
-		//PAREI
+		function confirm_delete_msg()
+		{					
+			//Cria um objeto template
+			$p = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']);
+			//Define o template para mensagens de retorno da funcao
+			$p->set_file(
+				Array(
+					'delete_msg_t' => 'delete_msg.tpl'
+				)
+			);
+			$p->set_block('delete_msg_t','retorno');			
+			$p->set_var('lang_delete_msg', lang("Do you like to delete this message?"));				
+			$p->set_var('lang_yes', lang("Yes"));	
+			$p->set_var('lang_no', lang("No"));
+			$p->set_var('link_yes', 'index.php?menuaction=mobile.ui_mobilemail.delete_msg&msg_number='.$_GET['msg_number'].'&msg_folder='.$_GET['msg_folder']);
+			$p->set_var('link_no', 'index.php?menuaction=mobile.ui_mobilemail.show_msg&amp;msg_number='.$_GET['msg_number'].'&amp;msg_folder='.$_GET['msg_folder']);	
+			
+			$p->pfp('out','retorno');  
+		}
+
 		function delete_msg()
 		{
-		
-			$this->username           = $_SESSION['phpgw_info']['expressomail']['user']['userid'];
-			$this->password           = $_SESSION['phpgw_info']['expressomail']['user']['passwd'];
-			$this->imap_server        = $_SESSION['phpgw_info']['expressomail']['email_server']['imapServer'];
-			$this->imap_port          = $_SESSION['phpgw_info']['expressomail']['email_server']['imapPort'];
-			$this->imap_delimiter = $_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter'];
-
-			$mbox_stream = @imap_open("{".$this->imap_server.":".$this->imap_port.$this->imap_options."}".$folder, $this->username, $this->password) or die(serialize(array('imap_error' => imap_last_error())));
-
-
+			if (isset($_GET['msg_number']))
+			{
+				$params = array(
+					'msgs_number' => $_GET['msg_number'],
+					'folder' => $this->current_folder,
+					'new_folder_name' => 'Trash',
+					'new_folder' => 'INBOX/Trash'
+				);
+			}	
+
+			$this->imap_functions->move_messages($params);
+			//Cria um objeto template
+			$p = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']);
+			//Define o template para mensagens de retorno da funcao
+			$p->set_file(
+				Array(
+					'move_msg_t' => 'sent_msg.tpl'
+				)
+			);
+			$p->set_block('move_msg_t','retorno');
+			//@header('Refresh: 1; url=./ui_mobilemail.index?folder='.$this->current_folder);			
+			$p->set_var('msg', lang("The message was moved to trash"));				
+
+			$p->pfp('out','retorno');				   
+		    
 		}
 
Index: trunk/mobile/templates/default/delete_msg.tpl
===================================================================
--- trunk/mobile/templates/default/delete_msg.tpl	(revision 1453)
+++ trunk/mobile/templates/default/delete_msg.tpl	(revision 1453)
@@ -0,0 +1,4 @@
+<!-- BEGIN retorno -->
+<p>&nbsp;&nbsp;&nbsp;{lang_delete_msg}</p>
+<p>&nbsp;&nbsp;&nbsp;<a href="{link_yes}">{lang_yes}</a>&nbsp;&nbsp;&nbsp;<a href="{link_no}">{lang_no}</a></p>
+<!-- END retorno -->
Index: trunk/mobile/templates/default/view_msg.tpl
===================================================================
--- trunk/mobile/templates/default/view_msg.tpl	(revision 517)
+++ trunk/mobile/templates/default/view_msg.tpl	(revision 1453)
@@ -14,5 +14,5 @@
 
 <!-- BEGIN reply_msg -->
-<p>&nbsp;&nbsp;&nbsp;<a href="{reply}">{reply_text}</a></p>
+<p>&nbsp;&nbsp;&nbsp;<a href="{reply}">{reply_text}</a>&nbsp;&nbsp;&nbsp;<a href="{delete}">{Delete}</a></p>
 <!-- END reply_msg -->
 
