Changeset 8 for Common/Mail.php
- Timestamp:
- Jan 22, 2016, 5:13:22 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Common/Mail.php
r4 r8 96 96 function Send() 97 97 { 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')); 99 99 100 100 $Body = $this->BuildAttachment($this->BuildBody()); … … 126 126 } 127 127 } 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')); 129 129 130 130 $this->Headers['Mime-Version'] = '1.0'; … … 142 142 $this->Subject = strtr($this->Subject, "\r\n", ' '); 143 143 144 if($this->Subject == '') throw new Exception( 'Mail: Missing Subject');144 if($this->Subject == '') throw new Exception(T('Mail message missing Subject')); 145 145 146 146 … … 162 162 { 163 163 if(!$this->ValidEmail($Address)) 164 throw new Exception( 'Mail: Invalid address '.$Address);164 throw new Exception(sprintf(T('Mail message invalid address %s'), $Address)); 165 165 } 166 166 } … … 190 190 { 191 191 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)); 193 193 $Data = file_get_contents($FileName); 194 194 } else
Note:
See TracChangeset
for help on using the changeset viewer.