public function sendEmail($envelope)
    {
        $validate = $envelope->validate();
        if (is_object($validate)) {
            return $validate;
        }

        $parameters = $envelope->buildParameters();
        $this->_action = $envelope->action;
        $this->_method = 'POST';
        $this->_refreshDate();

        $this->_generateSignature($parameters);
        $res = $this->_request();
        if ($res['code'] == 200) {
            if (isset($res['body']->SendRawEmailResult)) {
                return (string) $res['body']->SendRawEmailResult->MessageId;
            }
            
            return (string) $res['body']->SendEmailResult->MessageId;
        } else {
            return new SimpleEmailServiceError((string) $res['body']->Error->Code);
        }
    }
public function sendEmail($envelope)
    {
        $validate = $envelope->validate();
        if (is_object($validate)) {
            return $validate;
        }

        $parameters = $envelope->buildParameters();
        $this->_action = $envelope->action;
        $this->_method = 'POST';
        $this->_refreshDate();

        $this->_generateSignature($parameters);
        $res = $this->_request();
        if ($res['code'] == 200) {
            if (isset($res['body']->SendRawEmailResult)) {
                return (string) $res['body']->SendRawEmailResult->MessageId;
            }
            
            return (string) $res['body']->SendEmailResult->MessageId;
        } else {
            return new SimpleEmailServiceError((string) $res['body']->Error->Code);
        }
    }
public function sendEmail ( $ envelope ) { $ validate = $ envelope -> validate ( ) ; if ( is_object ( $ validate ) ) { return $ validate ; } $ parameters = $ envelope -> buildParameters ( ) ; $ this -> _action = $ envelope -> action ; $ this -> _method = 'POST' ; $ this -> _refreshDate ( ) ; $ this -> _generateSignature ( $ parameters ) ; $ res = $ this -> _request ( ) ; if ( $ res [ 'code' ] == 200 ) { if ( isset ( $ res [ 'body' ] -> SendRawEmailResult ) ) { return ( string ) $ res [ 'body' ] -> SendRawEmailResult -> MessageId ; } return ( string ) $ res [ 'body' ] -> SendEmailResult -> MessageId ; } else { return new SimpleEmailServiceError ( ( string ) $ res [ 'body' ] -> Error -> Code ) ; } }
Send the email to some specified addresses.

@param SimpleEmailServiceEnvelope $envelope Instance of
SimpleEmailServiceEnvelope class.

@return string MessageId.
Send the email to some specified addresses .