Changeset 8 for Common/Mail.php


Ignore:
Timestamp:
Jan 22, 2016, 5:13:22 PM (9 years ago)
Author:
chronos
Message:
  • Added: Setup and Update class for basic web application setup and configuration.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Common/Mail.php

    r4 r8  
    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.