设置YiiMail扩展时出错

I am trying to setup YiiMail and I am having the following error message:

Error 500
 Alias "ext.yii-mail.YiiMail" is invalid. Make sure it points to an existing PHP file and the file is readable.enter code here

I have placed the YiiMail extenstion in the following directory:

/myapp/protected/extensions/
/myapp/protected/extensions/mail/
/myapp/protected/extensions/mail/YiiMail.php
/myapp/protected/extensions/mail/YiiMailMessage.php

Can anyone explain why I get this error as it appears to be in the correct extensions directory (with all the other existing extensions)

I've added the following to my config array within the components section:

 'mail' => array(
            'class' => 'ext.yii-mail.YiiMail',
            'transportType' => 'php',
            'viewPath' => 'application.views.mail',
            'logging' => false,
            'dryRun' => false
        ),

And again the following to the import section of the config array

'import' => array('ext.mail.YiiMailMessage'),

The 'class' array item was incorrect - all good now