I used to develop web application using Java. For example in user registration to our web app, we usually send the activation code via email. In Java, usually I create a new thread and put the email sending process in this new thread so it does not blocked the rest of the code execution. I am relatively new to PHP, what should we do it in Yii/PHP?
You could add your emails to a queue (whatever that is, e.g. a db table) and use a separate process (or a cron job) to process that queue. One implementation for that is available from PEAR, but never used it though.