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

Documentation

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

You can configure the extension as follows:

'components'=>array(
	'email'=>array(
		'class'=>'application.extensions.email.Email',
		'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('application.extensions.email.debug'); ?>

Example code:

$email = Yii::app()->email;
$email->to = 'admin@example.com';
$email->subject = 'Hello';
$email->message = 'Hello brother';
$email->send();

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
12 followers
9 927 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: Mail
Tags:
Developed by: jonah
Created on: Jan 13, 2009
Last updated: 13 years ago

Downloads

show all