~automne-team/automne/trunk

« back to all changes in this revision

Viewing changes to automne/classes/common/email.php

  • Committer: sebastien
  • Date: 2011-02-16 17:40:16 UTC
  • Revision ID: sebastien.pauchet@ws-interactive.fr-20110216174016-5w1cgx0t5049az2h
Correct two bugs in module import : for row creation and CSS and JS import
Correct a bug in files copy on windows
Add some checks in file path to comply with windows path format
Add a constant to log email contents in error log
Change scripts max execution time to 5 minutes

Show diffs side-by-side

added added

removed removed

Lines of Context:
532
532
                        return false;
533
533
                }
534
534
                $emailSent = true;
535
 
                if (NO_APPLICATION_MAIL) {
536
 
                        return $emailSent;
537
 
                }
538
535
                if (!$this->_emailTo) {
539
536
                        $this->raiseError('emailTo can not be null');
540
537
                        return false;
655
652
                                $headers.="Content-Type: multipart/mixed;\n\tboundary=\"".$OB."\"\n";
656
653
                                //Check drop emails list (Automne default emails)
657
654
                                if (!in_array($to, $this->_drop) && !in_array($From, $this->_drop)) {
658
 
                                        //send emails
659
 
                                        $sent = @mail($to,$this->EncodeHeader($Subject),$Msg,$headers);
 
655
                                        //log in the cms_error_log the complete email
 
656
                                        if (LOG_APPLICATION_MAIL) {
 
657
                                                $this->log($to."\n".$this->EncodeHeader($Subject)."\n\n".$Msg);
 
658
                                        }
 
659
                                        //if mail deactivated always return true
 
660
                                        if (NO_APPLICATION_MAIL) {
 
661
                                                return $emailSent;
 
662
                                        }else{
 
663
                                                //send emails
 
664
                                                $sent = @mail($to,$this->EncodeHeader($Subject),$Msg,$headers);
 
665
                                        }
660
666
                                        $emailSent = $emailSent && $sent;
661
667
                                        if (LOG_SENDING_MAIL) {
662
668
                                                $log = new CMS_log();