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.
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: http://www.yiiframework.com/extension/mail
It uses Swift Mailer, which allows to use smtp gmail. Example there: http://swiftmailer.org/wikidocs/v3/connections/smtp
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:
'import'=>array(
'application.models.*',
'application.components.*',
'application.extensions.yii-mail.YiiMailMessage',
),
'components'=>array(
// ...
'mail'=>array(
'class'=>'ext.yii-mail.YiiMail',
),
// ...
),
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: http://swiftmailer.org/wikidocs/v3/connections/smtp
Thanks for your helpinh i have solved my problem ![]()