public function validate()
    {
        if (count($this->_to) == 0
            && count($this->_cc) == 0
            && count($this->_bcc) == 0
        ) {
            return new SimpleEmailServiceError('Destination');
        }

        if (strlen($this->_source) == 0) {
            return new SimpleEmailServiceError('EmailSource');
        }

        if (strlen($this->_subject) == 0) {
            return new SimpleEmailServiceError('EmailSubject');
        }

        if (strlen($this->_body) == 0) {
            return new SimpleEmailServiceError('EmailBody');
        }
        return true;
    }
public function validate()
    {
        if (count($this->_to) == 0
            && count($this->_cc) == 0
            && count($this->_bcc) == 0
        ) {
            return new SimpleEmailServiceError('Destination');
        }

        if (strlen($this->_source) == 0) {
            return new SimpleEmailServiceError('EmailSource');
        }

        if (strlen($this->_subject) == 0) {
            return new SimpleEmailServiceError('EmailSubject');
        }

        if (strlen($this->_body) == 0) {
            return new SimpleEmailServiceError('EmailBody');
        }
        return true;
    }
public function validate ( ) { if ( count ( $ this -> _to ) == 0 && count ( $ this -> _cc ) == 0 && count ( $ this -> _bcc ) == 0 ) { return new SimpleEmailServiceError ( 'Destination' ) ; } if ( strlen ( $ this -> _source ) == 0 ) { return new SimpleEmailServiceError ( 'EmailSource' ) ; } if ( strlen ( $ this -> _subject ) == 0 ) { return new SimpleEmailServiceError ( 'EmailSubject' ) ; } if ( strlen ( $ this -> _body ) == 0 ) { return new SimpleEmailServiceError ( 'EmailBody' ) ; } return true ; }
Validates instance.
This is used before attempting a SendEmail or SendRawEmail.

@return Error or boolean
Validates instance . This is used before attempting a SendEmail or SendRawEmail .