Home

Awesome

yii-emailer

Extension for creating and sending emails for the Yii PHP framework.

Usage

yiic migrate --migrationPath=vendor.nordsoftware.yii-emailer.migrations

public function behaviors()
    {
        return array_merge(parent::behaviors(), array(
            'emailer' => array(
                'class' => 'EmailBehavior',
            ),
        ));
    }
return array(
'components' => array(
        'email' => array(
            'class' => 'vendor.nordsoftware.yii-emailer.components.Emailer'
        )
    ));
$email = $this->createEmail($from, $to, $subject, $body, array('body'=>$message));
$this->sendEmail($email);
    'templates'=>array(
      'foo'=>array(
       'subject'=>'Foo',
       'view'=>'foo', // refers to a view in views/email
      ),
    ),