Changeset 4045 for extensions
- Timestamp:
- Oct 15, 2009, 4:36:45 PM (14 years ago)
- Location:
- extensions/Mail_supervisor
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Mail_supervisor
-
Property
svn:ignore
set to
_notes
-
Property
svn:ignore
set to
-
extensions/Mail_supervisor/admin/mail_superv_admin.php
r4041 r4045 272 272 } 273 273 //================================================================================ 274 if ( $mails_données['reste'] < 0 ) { 275 $mails_données['quarantaine'] =false ; 276 $mails_données['date_quarantaine']= time() ; 277 $mails_données['nb_spams'] = 0 ; 278 $modif == true ; 279 } 280 281 274 282 $rest_mail = $mails_données['rest_mail'] ; 275 283 if ($rest_mail <=0 || $mails_données['nb_mails'] ==0 ){ -
extensions/Mail_supervisor/include
-
Property
svn:ignore
set to
_notes
-
Property
svn:ignore
set to
-
extensions/Mail_supervisor/include/fonctions.php
r4041 r4045 181 181 function corrige_header($Carbonne,$headers) 182 182 { 183 global $mails_options,$conf_mail,$mailto; 184 185 $splitter="|".$Carbonne.":(.*)\n|U"; 186 preg_match_all($splitter,$headers, $out,PREG_PATTERN_ORDER); 187 $val=array(); 188 $match=array("<",">"); 189 $string=array("","") ; 190 foreach($out as $messages) 191 { 192 $val[]= $messages[0] ; 193 } 194 195 196 $val[1]= str_replace( $match,$string,$val[0] ) ; 197 $src=$val[0]; 198 199 $splitter="|\"(.*)\"|U"; 200 preg_match_all($splitter,$val[1], $out,PREG_PATTERN_ORDER); 201 $string=array(); 202 $string = array_fill( 0, count($out), ''); 203 $dest = str_replace($out[0], $string, $val[1]) ; 204 if ($mailto <>"" ) { 205 $dest=str_replace($mailto.',', '', $dest) ; 206 $dest=str_replace($mailto, '', $dest) ; 207 208 } 209 210 211 $headers = str_replace( $src,$dest, $headers) ; 183 global $mails_options,$conf_mail,$mailto,$args; 184 $headers = preg_replace('/.*'.$Carbonne.'(.*).\n/i', $Carbonne.' : '.get_strict_email_list(implode(' , ', $args[$Carbonne]))."\n", $headers); 185 212 186 return $headers; 213 187 -
extensions/Mail_supervisor/include/function_test_send.php
r4044 r4045 72 72 $args['Bcc']=$groups; 73 73 $args['from'] = $conf_mail['formated_email_webmaster']; 74 75 76 77 74 //================================================================== 78 75 $message_texte=sprintf( … … 83 80 $args['from'] 84 81 ); 85 $message_texte .=$message;86 82 //================================================================== 87 $message_html=$message_texte; 88 // $message_html .= '<img src="'.PHPWG_ROOT_PATH.'admin/template/goto/theme/roma/images/piwigo_logo_sombre_214x100.png" />'; 89 83 $message_html = $message_texte; 84 90 85 91 86 //========================================================================== -
extensions/Mail_supervisor/language/fr_FR/plugin.lang.php
r4044 r4045 89 89 $lang['message_texte %s %s %s %s'] =' 90 90 %s 91 Bonjour %s , 91 Bonjour "%s" , 92 92 93 %s 93 94 94 A bientot 95 %s 95 96 A bientot 97 98 %s 96 99 '; 97 100 -
extensions/Mail_supervisor/main.inc.php
r4044 r4045 92 92 93 93 $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 =============================== 101 if ( $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 94 124 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 } 110 126 111 127 if ($mails_options[2]=='on') { … … 130 146 $ret = false; 131 147 if ($nb_destinataires > 0) { 132 148 $ret = mail($mailto, $subject, $content, $headers); 133 149 134 150 }else{ … … 148 164 if ($alerte_spam ) { 149 165 $type="Spams"; 150 $d1=$mails_données['nb_spams'];166 151 167 $d1=$mails_données['nb_spams'] . ' \\ ' . $mails_données['nb_spams_maxi']; 168 $d2=$mails_données['nb_spams']; 152 169 $d3= $mails_données['rest_spam']; 153 170 $d4=time()+$d3 ; … … 228 245 if ( $trop_de_spam ) { 229 246 $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 232 248 $mails_données['date_quarantaine']= time() ; 233 249 $mails_données['quarantaine']= true ;
Note: See TracChangeset
for help on using the changeset viewer.