Changeset 11813


Ignore:
Timestamp:
Jul 22, 2011, 3:31:44 PM (13 years ago)
Author:
cljosse
Message:

[extensions] set_plugins fix bugs on notification with free

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Mail_supervisor/main.inc.php

    r11808 r11813  
    200200      }
    201201      //======================================================
     202      // Format TEXTE
     203      //======================================================
     204      if($args['content_format'] == 'text/plain' &&  $args['email_format'] == 'text/plain'){
     205       $pattern ="/" . preg_quote("Content-Type: multipart/alternative", '/')."/" ;       
     206       $headers= preg_replace($pattern, "Content-type: text/plain",$headers); //format text
     207       $content=$args['content'];
     208        $cache_key = $args['email_format'].'-'.$lang_info['code'].'-'.$args['theme'];
     209        $content.= $conf_mail[$cache_key]['footer'];
     210
     211        }
     212      //======================================================
    202213      // drop LF barre 
    203214      //======================================================
    204       $pattern="/xxxxx/";
    205       if(  preg_match($pattern, $mailto) ||  preg_match($pattern, $headers) ){
    206         $pattern="---=";
    207         $pattern ="/" . preg_quote($pattern, '/')."/" ;
    208         $pattern ="#(?<!\r)\n#si" ;
    209         if(  preg_match($pattern, $content)  ){
    210             $infos_message .= $pattern. " <br />";   
    211             $content= preg_replace( $pattern, "\r\n", $content);   // 
    212             //$content = str_replace("\n.", "\n..", $content);
    213         }
    214        
    215 
    216       }else{
    217           $pattern="/hotmail/";
    218           if(  preg_match($pattern, $mailto) ||  preg_match($pattern, $headers) ){
    219              // 
    220           }else{
     215       $pattern ="/" . preg_quote($pattern, '/')."/" ;
    221216            $pattern="/free.fr|club/";
    222217            if(  preg_match($pattern, $mailto) ||  preg_match($pattern, $headers) ){
    223218                $content= preg_replace('#(?<!\r)\n#si', "\r\n", $content); //drop LF barre   
    224             }else{
     219        }
    225220               
    226             }
    227           }
    228       }
    229221
    230222  //=====================================================================
     
    233225        $infos_message = l10n('Sv_mail_not_send');
    234226        $envoie_ok= false ;
    235         return false ;
     227
    236228
    237229    }
Note: See TracChangeset for help on using the changeset viewer.