[Vtigercrm-commits] [Vtiger development] #8089: Mail Converter ignore not encoded words in subject beginnig

Vtiger development vtiger-tickets at trac.vtiger.com
Fri Jun 13 10:30:31 GMT 2014


#8089: Mail Converter ignore not encoded words in subject beginnig
------------------------------------------------+--------------------------
 Reporter:  branokosik                          |       Owner:  developer
     Type:  defect                              |      Status:  new
 Priority:  major                               |   Milestone:  6.1.0
Component:  vtigercrm                           |     Version:  6.1.0 - wip
 Severity:  Critical                            |  Resolution:
 Keywords:  mail, converter, subject, encoding  |
------------------------------------------------+--------------------------

Comment (by rishab):

 replacing the existing code with

 {{{
 preg_match_all('/=\?([^\?]+)\?([^\?]+)\?([^\?]+)\?=/', $input, $matches);
                 array_filter($matches);
                 if(count($matches[0])>0){
                 $decodedArray=  imap_mime_header_decode($input);
                 foreach($decodedArray as $part=>$prop){
                             $decodevalue=$prop->text;
                             $charset=$prop->charset;
                                 $value =
 self::__convert_encoding($decodevalue, $targetEncoding, $charset);
                                 array_push($words, $value);
                     }
                 }
                 if(!empty($words)) {
                         $returnvalue = implode('', $words);
                 }
 }}}

 Now matches both encoded and not encoded words.

--
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/8089#comment:5>
Vtiger development <http://trac.vtiger.com/>
Vtiger CRM


More information about the vtigercrm-commits mailing list