Extension cron - sending email

stan911

New Member
I'm interested in sending an email on a daily basis. We're discussing the crons on this topic here but what I'm interested is how to send an email within that cron and if there are any templates I can use.
This addresses administrator users only ( /backend ) .

Thanks
 
@stan911 - as the example at:
PHP:
Yii::app()->hooks->addAction('console_command_daily_after_process', function(){
    $users = User::model()->findAll();
    foreach ($users as $user) {
        // send email here
    }
});
See /apps/backend/controllers/Customers_mass_emailsController.php for an idea on how to send in bulk.
 
Back
Top