mailbox functionality

I am searching for a an example of a mailbox functionality and implementation of inbox in YII framework sorry but i am really new to this , i want to implement messaging etc., do you think its best to be store messages in database or xml or mail server?

there you go

http://www.yiiframework.com/extension/private-messaging/

Awesome!! Thanks