Ignore:
Timestamp:
07/19/11 17:44:12 (13 years ago)
Author:
airton
Message:

Ticket #2147 - Permitir ao usuario reportar problemas em mensagens de email

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/inc/class.imap_functions.inc.php

    r4824 r4830  
    1414                'get_folders_list'                              => True, 
    1515                'import_msgs'                                   => True, 
     16                'report_mail_error'             => True, 
    1617                'msgs_to_archive'                               => True 
    1718        ); 
     
    42674268        return $exporteml->download_all_attachments($params); 
    42684269    } 
     4270         
     4271        /**  
     4272         * Método que envia um email reportando um erro no email do usuário  
     4273         * @license http://www.gnu.org/copyleft/gpl.html GPL  
     4274         * @author Prognus Software Livre (http://www.prognus.com.br)  
     4275         */   
     4276        function report_mail_error($params)  
     4277        {         
     4278                $params = $params['params'];  
     4279                $array_params = explode(";;", $params);  
     4280                $id_msg   = $array_params[0];  
     4281                $msg_user = $array_params[1];  
     4282                 
     4283                if($msg_user == '')  
     4284                        $msg_user = "Sem mensagem!";  
     4285                          
     4286                $toaddresses = $_SESSION['phpgw_info']['expressomail']['server']['sugestoes_email_to'];   
     4287                $toaddress   = explode(",", $toaddresses);        
     4288                                  
     4289                for($i=0; $i<count($toaddress); $i++)  
     4290                        $toaddress[$i] = trim($toaddress[$i]);  
     4291                                  
     4292                $toname       = $_SESSION['phpgw_info']['expressomail']['user']['fullname'];  
     4293                  
     4294                $exporteml    = new ExportEml();  
     4295                $mail_content = $exporteml->export_msg_data($id_msg, $msg_folder);  
     4296                $this->open_mbox($msg_folder);   
     4297                $title = "Erro de email reportado";  
     4298                $body  = "<body>O usuário <strong>$toname</strong> reportou um erro na tentativa de acesso ao conteúdo do email.<br><br>Segue em anexo o fonte da mensagem" .                           " reportada.<br><br><hr><strong><u>Mensagem do usuário:</strong></u><br><br><br>" .  
     4299                                "$msg_user</body><br><br><hr>";  
     4300                              
     4301                $mailService = ServiceLocator::getService('mail');       
     4302                $mailService->addAttachment($mail_content, 'report.eml', 'application/text');  
     4303                $mailService->send($toaddress, $GLOBALS['phpgw_info']['user']['email'], $title, $body);  
     4304        }  
     4305         
     4306         
     4307         
    42694308    function get_quota_folders(){  
    42704309 
Note: See TracChangeset for help on using the changeset viewer.