Skip to content

Instantly share code, notes, and snippets.

@tjlytle
Created October 17, 2011 18:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save tjlytle/1293424 to your computer and use it in GitHub Desktop.
Save tjlytle/1293424 to your computer and use it in GitHub Desktop.
SendGrid Configuration for Zend Framework
<?php
$config = array(
'username' => 'sendgridusername',
'password' => 'sendgridpassword',
'auth' => 'plain'
);
$transport = new Zend_Mail_Transport_Smtp('smtp.sendgrid.net', $config);
$mail = new Zend_Mail();
$mail->setFrom('you@example.com', 'Your Name');
$mail->setSubject('Email Test');
$mail->setBodyHtml('<p>Test</p>');
$mail->send($transport);
@walmik
Copy link

walmik commented Nov 28, 2012

$mail->addTo('you@example.com');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment