Changeset 43 for trunk/lib/Email.inc.php


Ignore:
Timestamp:
Dec 18, 2005 12:38:31 AM (18 years ago)
Author:
scdev
Message:

${1}

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Email.inc.php

    r42 r43  
    226226
    227227        // Ensure required values exist.
    228         if (!isset($this->_template)) {
    229             App::logMsg(sprintf('Cannot send email. Template not set.', null), LOG_ERR, __FILE__, __LINE__);
     228        if (!isset($this->_params['subject'])) {
     229            App::logMsg(sprintf('Cannot send email to %s. SUBJECT not defined.', $this->_params['to']), LOG_ERR, __FILE__, __LINE__);
     230            return false;
     231        } else if (!isset($this->_template)) {
     232            App::logMsg(sprintf('Cannot send email: "%s". Template not set.', $this->_params['subject']), LOG_ERR, __FILE__, __LINE__);
    230233            return false;
    231234        } else if (!isset($this->_params['to'])) {
    232             App::logMsg(sprintf('Cannot send email. TO not defined.', null), LOG_ERR, __FILE__, __LINE__);
     235            App::logMsg(sprintf('Cannot send email: "%s". TO not defined.', $this->_params['subject']), LOG_NOTICE, __FILE__, __LINE__);
    233236            return false;
    234237        } else if (!isset($this->_params['from'])) {
    235             App::logMsg(sprintf('Cannot send email. FROM not defined.', null), LOG_ERR, __FILE__, __LINE__);
    236             return false;
    237         } else if (!isset($this->_params['subject'])) {
    238             App::logMsg(sprintf('Cannot send email. SUBJECT not defined.', null), LOG_ERR, __FILE__, __LINE__);
     238            App::logMsg(sprintf('Cannot send email: "%s". FROM not defined.', $this->_params['subject']), LOG_ERR, __FILE__, __LINE__);
    239239            return false;
    240240        }
Note: See TracChangeset for help on using the changeset viewer.