yii-sendgrid An extensions to integrate SendGrid in your Yii Application

Yii SendGrid

  1. Requirements
  2. Usage
  3. Resources

When it comes to build a great web application sending email in a reliable way can be an issue. SendGrid is one of the cloud-based email service on the corner that relieves businesses of the cost and complexity of maintaining custom email systems. SendGrid provides reliable delivery and scalability along with flexible API.

This extension wraps an reviewd version of the Alon Ben David's SendGrid PHP API and will let you send email with no latency and no need o wait replies from mail servers.


  • Yii 1.1
  • SendGrid Account


Add sendgrid extension to your main config file

    'class' => 'ext.sendgrid.sendgrid',

Then you're able to call all methods implemented in sendgridWeb.php and sendgridNewsletter.php, I only made the mail_send($args) method accesible from the extension entrypoint sendgrid.php cause in my needs it will be the most used.

Sending an email through this extension is dead easy:

$recipients = array('recipent@domain.com');		
$recipientsName = array('RecName');
$result = Yii::app()->sendgrid->sendMail($recipients, $recipientsName, '', 'Subject', 'Sent with SendGrid from Mr Iacobelli', 'text', 'sender@mail.com', 'anyone@domain.com', 'FromName', 'whosgonnaanswer@domain.com');


2 0
Yii Version: 1.1
License: GPL-3.0
Category: Mail
Developed by: Giuliano
Created on: Dec 19, 2012
Last updated: 11 years ago


show all

Related Extensions