email An email extensions with view/layout support, debug mode, and html support

  1. Documentation
  2. Change Log

This is an email extension. Allows fields such as BCC, CC, Reply-to addresses, and others. Also has an excellent debug mode, in which the extension does not actually send emails, but instead outputs it to the screen.

I have written a new mail extension for yii, which I believe to be superior to this one. Here it is


  • Yii 1.0.2 or above
  • Extract the release file under protected/extensions

You can configure the extension as follows:

		'delivery'=>'php', //Will use the php mailing function.  
		//May also be set to 'debug' to instead dump the contents of the email into the view

You need to put the debug widget somewhere in the view or layout, if you wish to use debug mode

<?php $this->widget(''); ?>

Example code:

$email = Yii::app()->email;
$email->to = '';
$email->subject = 'Hello';
$email->message = 'Hello brother';

Instead of defining the message with $email->message, you could instead define a view (and layout if you wish) to use as the email content. This is much more flexible and maintains MVC better.

Change Log

January 12, 2009
  • Initial release 1.0
January 23, 2009
  • Updated to support multi-byte and different languages.
January 24, 2009
  • 2nd attempt to support multi-byte.
26 3
9 927 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: Mail
Developed by: jonah
Created on: Jan 13, 2009
Last updated: 11 years ago


show all