if ($response->getStatus() != 200) { throw new Zend_Mail_Transport_Exception("SendGrid API: unexpected response: " . $response->getBody()); } } function sendFromSaved($from, $recipients, $body, array $headers, $subject) { $this->_mail = new Am_Mail_Saved(); $this->_mail->from = $from; $this->_mail->subject = $subject; $this->recipients = $recipients; $this->body = $body; $this->_prepareHeaders($headers); $this->_sendMail(); } } Am_Mail::initDefaults(); /** * I believe using Zend_Validator_Hostname adds unacceptable overhead to Zend_Mail_Protocol * class, so it is disabled in this project * @internal * @package Am_Mail */ class Am_Util_Dummy_Zend_Validate { function addValidator() { } function isValid() { return 1; }