You can directly integrate Zend's mail module with SendGrid to use our SMTP servers for outgoing messages.
1<?php2require_once '$HOME/sendgrid/Zend/library/Zend/Mail.php';3require_once '/$HOME/sendgrid/Zend/library/Zend/Mail/Transport/Smtp.php';45$smtpServer = 'smtp.sendgrid.net';6$username = 'username';7$api_key = 'api_key';89$config = array('ssl' => 'tls',10'port' => '587',11'auth' => 'login',12'username' => $username,13'api_key' => $api_key);1415$transport = new Zend_Mail_Transport_Smtp($smtpServer, $config);1617$mail = new Zend_Mail();1819$mail->setFrom('sendeexampexample@example.com', 'Some Sender');20$mail->addTo('email@example.com','Some Recipient');21$mail->setSubject('Test Subject');22$mail->setBodyText('This is the text of the mail using Zend.');2324$mail->send($transport);25?>
If you prefer a modular installation, then check out Jurian Sluiman's SlmMail project at GitHub.