Automatic Email

Hello everyone,

I am a new user of Yii framwork, and I have implement YiiMail, which works well. But now I want to send mails automatically at the end of each month, is it possible ?

Thank you,


yes. create custom command that prepares and sends those e-mails and add:

yiic [my-command-name]

to your crontab with proper timing (once a month).

Thank you for your answer. Right now, I’m not using crontab, because I am working on LocalHost (by WAMP). Is it difficult to set it up ? And is it reserved to Unix/Linux OS ?

crontab is linux-only feature. under Windows you have something named "scheduled tasks" under "control panel" > "administrative tools" which do pretty same - lets you schedule commands execution.

I have seen answers on another forum for "scheduled tasks", and I will implement it to set automatic mail up. Thank you for your answer.