library/Garp/Mail/Transport/AmazonSes.php
public function _sendMail()
    {
        $date = gmdate('D, d M Y H:i:s O');

        //Send the request
        $client = new Zend_Http_Client($this->_host);
        $client->setMethod(Zend_Http_Client::POST);
        $client->setHeaders(array(
            'Date' => $date,
            'X-Amzn-Authorization' => $this->_buildAuthKey($date)
        ));
        $client->setEncType('application/x-www-form-urlencoded');

        //Build the parameters
        $params = array(
            'Action' => 'SendRawEmail',
            'Source' => $this->_mail->getFrom(),
            'RawMessage.Data' => base64_encode(sprintf("%s\n%s\n", $this->header, $this->body))
        );

        $recipients = explode(',', $this->recipients);
        while(list($index, $recipient) = each($recipients)){
            $params[sprintf('Destination.ToAddresses.member.%d', $index + 1)] = $recipient;
        }

        $client->resetParameters();
        $client->setParameterPost($params);
        $response = $client->request(Zend_Http_Client::POST);

        if($response->getStatus() != 200){
            throw new Exception($response->getBody());
        }
    }
public function _sendMail()
    {
        $date = gmdate('D, d M Y H:i:s O');

        //Send the request
        $client = new Zend_Http_Client($this->_host);
        $client->setMethod(Zend_Http_Client::POST);
        $client->setHeaders(array(
            'Date' => $date,
            'X-Amzn-Authorization' => $this->_buildAuthKey($date)
        ));
        $client->setEncType('application/x-www-form-urlencoded');

        //Build the parameters
        $params = array(
            'Action' => 'SendRawEmail',
            'Source' => $this->_mail->getFrom(),
            'RawMessage.Data' => base64_encode(sprintf("%s\n%s\n", $this->header, $this->body))
        );

        $recipients = explode(',', $this->recipients);
        while(list($index, $recipient) = each($recipients)){
            $params[sprintf('Destination.ToAddresses.member.%d', $index + 1)] = $recipient;
        }

        $client->resetParameters();
        $client->setParameterPost($params);
        $response = $client->request(Zend_Http_Client::POST);

        if($response->getStatus() != 200){
            throw new Exception($response->getBody());
        }
    }
public function _sendMail ( ) { $ date = gmdate ( 'D, d M Y H:i:s O' ) ; //Send the request $ client = new Zend_Http_Client ( $ this -> _host ) ; $ client -> setMethod ( Zend_Http_Client :: POST ) ; $ client -> setHeaders ( array ( 'Date' => $ date , 'X-Amzn-Authorization' => $ this -> _buildAuthKey ( $ date ) ) ) ; $ client -> setEncType ( 'application/x-www-form-urlencoded' ) ; //Build the parameters $ params = array ( 'Action' => 'SendRawEmail' , 'Source' => $ this -> _mail -> getFrom ( ) , 'RawMessage.Data' => base64_encode ( sprintf ( "%s\n%s\n" , $ this -> header , $ this -> body ) ) ) ; $ recipients = explode ( ',' , $ this -> recipients ) ; while ( list ( $ index , $ recipient ) = each ( $ recipients ) ) { $ params [ sprintf ( 'Destination.ToAddresses.member.%d' , $ index + 1 ) ] = $ recipient ; } $ client -> resetParameters ( ) ; $ client -> setParameterPost ( $ params ) ; $ response = $ client -> request ( Zend_Http_Client :: POST ) ; if ( $ response -> getStatus ( ) != 200 ) { throw new Exception ( $ response -> getBody ( ) ) ; } }
Send an email using the amazon webservice api

@return void
Send an email using the amazon webservice api