developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Ticket #932: patch-jmailer.diff

File patch-jmailer.diff, 1.0 KB (added by bastnic, 11 years ago)
  • lib/jelix/utils/jMailer.class.php

    diff --git a/lib/jelix/utils/jMailer.class.php b/lib/jelix/utils/jMailer.class.php
    index bb8e318..da51ff4 100644
    a b class jMailer extends PHPMailer{ 
    141141                $mail = '';
    142142                foreach($toList as $key => $val){
    143143                        if($key > 0) $mail.="\n\n";
    144                         $mail.= $header.$this->EncodeHeader($this->SecureHeader($this->Subject)).$body;
     144                        $mail.= $header.$this->EncodeHeader($this->SecureHeader($this->Subject))."\n\n".$body;
    145145                }
    146146                if(!isset($_SERVER['REMOTE_ADDR'])){
    147147                        $_SERVER['REMOTE_ADDR'] = '127.0.0.1';
    class jMailer extends PHPMailer{ 
    149149                return jFile::write($this->getStorageFile(), $mail);
    150150        }
    151151        protected function getStorageFile(){
    152                 return rtrim($this->filePath,'/').'/mail.'.$_SERVER['REMOTE_ADDR'].'-'.date('Ymd-His');
     152                return rtrim($this->filePath,'/').'/mail.'.$_SERVER['REMOTE_ADDR'].'-'.date('Ymd-His').'-'.jAuth::getRandomPassword(4);
    153153        }
    154154        function SetLanguage($lang_type = 'en_EN', $lang_path = 'language/'){
    155155                $this->lang = $lang_type;