Ignore:
Timestamp:
Jan 21, 2016, 9:54:58 AM (9 years ago)
Author:
chronos
Message:
  • Modified: Custom install script replaced by more sophisticated Setup class which also allows to configure system parameters and application modules.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/Mail.php

    r838 r858  
    9696  function Send()
    9797  {
    98     if(count($this->Bodies) == 0) throw new Exception('Mail: Need at least one text body');
     98    if(count($this->Bodies) == 0) throw new Exception(T('Mail message need at least one text body'));
    9999
    100100    $Body = $this->BuildAttachment($this->BuildBody());
     
    126126      }
    127127    }
    128     if($To == '') throw new Exception('Mail: Need at least one recipient address');
     128    if($To == '') throw new Exception(T('Mail message need at least one recipient address'));
    129129
    130130    $this->Headers['Mime-Version'] = '1.0';
     
    142142    $this->Subject = strtr($this->Subject, "\r\n", '  ');
    143143
    144     if($this->Subject == '') throw new Exception('Mail: Missing Subject');
     144    if($this->Subject == '') throw new Exception(T('Mail message missing Subject'));
    145145
    146146
     
    162162    {
    163163      if(!$this->ValidEmail($Address))
    164   throw new Exception('Mail: Invalid address '.$Address);
     164  throw new Exception(sprintf(T('Mail message invalid address %s'), $Address));
    165165    }
    166166  }
     
    190190        {
    191191          if(!file_exists($FileName))
    192             throw new Exception('Mail: Attached file '.$FileName.' can\'t be found');
     192            throw new Exception(sprintf(T('Mail message attached file %s can\'t be found'), $FileName));
    193193          $Data = file_get_contents($FileName);
    194194        } else
Note: See TracChangeset for help on using the changeset viewer.