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
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
$email = Yii::app()->email; $email->to = 'firstname.lastname@example.org'; $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.