Ignore:
Timestamp:
Oct 15, 2009, 4:36:45 PM (15 years ago)
Author:
cljosse
Message:

[mail_supervisor] Modification gestion reprise spam

Location:
extensions/Mail_supervisor
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/Mail_supervisor

    • Property svn:ignore set to
      _notes
  • extensions/Mail_supervisor/main.inc.php

    r4044 r4045  
    9292                 
    9393  $nb_destinataires=0;
     94                if ($mails_options[0] == 'on') {
     95                        if ($mailto == "" )     $mailto = $conf_mail['email_webmaster'];
     96                }   
     97 if ($mailto<>"" )            $nb_destinataires +=1;
     98 if (!empty($args['Cc']))     $nb_destinataires += count($args['Cc']);
     99 if (!empty($args['Bcc']))    $nb_destinataires += count($args['Bcc']);
     100   //================= réécriture de l'entête ===============================
     101if ( $nb_destinataires  == 1 )
     102        {
     103                if ($mailto == "" )
     104                  {
     105                 
     106                          if (!empty($args['Cc']))  $mailto  = get_strict_email_list(implode(',', $args['Cc'])) ;
     107                          if (!empty($args['Bcc'])) $mailto  = get_strict_email_list(implode(',', $args['Bcc'])) ;
     108                         
     109                                $headers = preg_replace('/.*Bcc(.*).\n/i', '', $headers);
     110                                $headers = preg_replace('/.*Cc(.*).\n/i', '', $headers);
     111                  }
     112        }else{
     113
     114   
     115                if (!empty($args['Cc']))
     116                        {
     117                        if ($mails_options[1] == 'on') {  $headers= corrige_header('Cc',$headers);}
     118                        }
     119                if (!empty($args['Bcc']))
     120                        {   
     121                                if ($mails_options[1] == 'on') {  $headers      = corrige_header('Bcc',$headers);}
     122                        }
     123
    94124 
    95  if ($mailto<>"" )  $nb_destinataires +=1;
    96    //================= réécriture de l'entête ===============================
    97 
    98 if ($mails_options[0] == 'on') {
    99         if ($mailto=="")        $mailto=$conf_mail['email_webmaster'];
    100 }
    101                 if (!empty($args['Cc']))
    102                 {$nb_destinataires += count($args['Cc']);
    103                  if ($mails_options[1] == 'on') {  $headers= corrige_header('Cc:',$headers);}
    104                 }
    105                 if (!empty($args['Bcc']))
    106                 {  $nb_destinataires += count($args['Bcc']);
    107                    if ($mails_options[1] == 'on') {  $headers   = corrige_header('Bcc',$headers);}
    108                 }
    109 
     125     }
    110126
    111127if ($mails_options[2]=='on')   {
     
    130146                $ret = false;
    131147                 if ($nb_destinataires > 0) {
    132                         $ret = mail($mailto, $subject, $content, $headers);
     148                  $ret = mail($mailto, $subject, $content, $headers);
    133149 
    134150                        }else{
     
    148164                        if ($alerte_spam ) {
    149165                        $type="Spams";
    150                                 $d1=$mails_données['nb_spams'];
     166                               
    151167                                $d1=$mails_données['nb_spams'] . '  \\  ' . $mails_données['nb_spams_maxi'];
     168                                $d2=$mails_données['nb_spams'];
    152169                                $d3= $mails_données['rest_spam'];
    153170                                $d4=time()+$d3 ;
     
    228245                                if ( $trop_de_spam ) {
    229246                                                $mails_données['nb_spams_maxi']=$mails_données['nb_spams'];
    230                                                 $quarantaine_periode="+".str_replace( $period_search, $period_match, $mails_données['quarantaine_periode']);
    231                                                 $next_day =  strtotime($quarantaine_periode);  // détection de 'Trop de spam
     247
    232248                                                $mails_données['date_quarantaine']= time()  ;   
    233249                                                $mails_données['quarantaine']= true    ;       
Note: See TracChangeset for help on using the changeset viewer.