Mail extension

Hello All,

I want to send email with attachement.

Any body can explain which is the best mail extension ??? ?That i use…

Thanks in advance :)

This one I use: http://www.yiiframework.com/extension/mail

It uses SwiftMailer which allows to attach files this way:




$files = CUploadedFile::getInstances($model, 'file');

foreach ($files as $file)

    $message->attach(new Swift_Attachment(file_get_contents($file->tempName), $file->name, $file->type));



I second that. YiiMail is the best. ;)

I used above solution but it gives error

include(Swift_Attachment.php) [<a href=‘function.include’>function.include</a>]: failed to open stream: No such file or directory

please help me out.

Did you install the extension and are you using it inside Yii?

The class should be autoloaded if you are.