public function validate() {
		if(count($this->to) == 0)
			return false;
		if($this->from == null || strlen($this->from) == 0)
			return false;
		// messages require at least one of: subject, messagetext, messagehtml.
		if(($this->subject == null || strlen($this->subject) == 0)
			&& ($this->messagetext == null || strlen($this->messagetext) == 0)
			&& ($this->messagehtml == null || strlen($this->messagehtml) == 0))
		{
			return false;
		}

		return true;
	}
public function validate() {
		if(count($this->to) == 0)
			return false;
		if($this->from == null || strlen($this->from) == 0)
			return false;
		// messages require at least one of: subject, messagetext, messagehtml.
		if(($this->subject == null || strlen($this->subject) == 0)
			&& ($this->messagetext == null || strlen($this->messagetext) == 0)
			&& ($this->messagehtml == null || strlen($this->messagehtml) == 0))
		{
			return false;
		}

		return true;
	}
public function validate ( ) { if ( count ( $ this -> to ) == 0 ) return false ; if ( $ this -> from == null || strlen ( $ this -> from ) == 0 ) return false ; // messages require at least one of: subject, messagetext, messagehtml. if ( ( $ this -> subject == null || strlen ( $ this -> subject ) == 0 ) && ( $ this -> messagetext == null || strlen ( $ this -> messagetext ) == 0 ) && ( $ this -> messagehtml == null || strlen ( $ this -> messagehtml ) == 0 ) ) { return false ; } return true ; }
Validates whether the message object has sufficient information to submit a request to SES.
This does not guarantee the message will arrive, nor that the request will succeed;
instead, it makes sure that no required fields are missing.

This is used internally before attempting a SendEmail or SendRawEmail request,
but it can be used outside of this file if verification is desired.
May be useful if e.g. the data is being populated from a form; developers can generally
use this function to verify completeness instead of writing custom logic.

@return boolean
Validates whether the message object has sufficient information to submit a request to SES . This does not guarantee the message will arrive nor that the request will succeed ; instead it makes sure that no required fields are missing .