asafswis
(Asafswis2)
1
hello
i try to defined a mail server gmail for contact form
and got this error
any one can assume why?
Property "CWebApplication.mail" is not defined.
Property "CWebApplication.mail" is not defined.
C:\xampp\htdocs\yii\framework\base\CModule.php(483)
471 }
472 }
473
474 /**
475 * Configures the module with the specified configuration.
476 * @param array $config the configuration array
477 */
478 public function configure($config)
479 {
480 if(is_array($config))
481 {
482 foreach($config as $key=>$value)
483 $this->$key=$value;
484 }
485 }
486
487 /**
488 * Loads static application components.
489 */
490 protected function preloadComponents()
491 {
492 foreach($this->preload as $id)
493 $this->getComponent($id);
494 }
495
Keith
(Kburton)
2
It’s saying that you’ve created a config entry with the key ‘mail’, which isn’t valid because it’s not a property of CWebApplication.
Try something like this:
http://allenprogram.blogspot.co.uk/2012/04/yii-framework-sending-email-via-gmail.html
asafswis
(Asafswis2)
3
hi tnx for reply
but i think its not help me here
i have the page of contact form, from the web application
i just need to get the mail from senders who try to send me mails.
Keith
(Kburton)
4
Seems like the right solution to me.
mentel
(Yii)
5
You can also try MailChimp Mandrill. It is very easy to integrate with an Yii application.
It is free for up to 12k emails per month.
'mail' => array(
'class' => 'ext.yii-mail.YiiMail',
'transportType' => 'php',
'viewPath' => 'application.views.mail',
'logging' => true,
'dryRun' => false ),
add this code to main.php
kkrieger
(Kkrieger85)
7
Hi,
sergiy is partially right.
I had the same problem "Property "CWebApplication.mail" is not defined."
As documented in YiiMail.php Lines 10 to 43 you have to add the mail-config-array into components-array. In my case after user-config-array 
Hope this helps.
kk