How to send email

Hello all i want to send email with yii, and i want to use smpt gmail. Do you have solution for my problem ? Actually i use my smpt, and i want to put configure smpt out from yii framework.

Try this extension:

It uses Swift Mailer, which allows to use smtp gmail. Example there:

Maybe you don’t even need this extension, because there are no default methods for smpt authentication, but you can add them by extending it’s classes ;)

Do you have example if i want to use it in yii ?

To use this extension, download it and extract into protected/extensions folder (directory name "yii-mail" for example). Then modify the main config:








    // ...




    // ...


Now you can use it as described in the extension’s page example.

To use SwiftMailer alone, just put it somewhere (e.g. extensions folder) and use it as described there:

Thanks for your helpinh i have solved my problem :D