Yii Framework Forum: Property "cwebapplication.mail" Is Not Defined. - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Property "cwebapplication.mail" Is Not Defined. Property "CWebApplication.mail" is not defined. Rate Topic: -----

#1 User is offline   asafswis 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 23
  • Joined: 17-September 12

Posted 03 October 2012 - 04:48 AM

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
0

#2 User is offline   Keith 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,594
  • Joined: 04-March 10
  • Location:UK

Posted 03 October 2012 - 04:56 AM

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....-via-gmail.html
0

#3 User is offline   asafswis 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 23
  • Joined: 17-September 12

Posted 03 October 2012 - 05:23 AM

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.
0

#4 User is offline   Keith 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,594
  • Joined: 04-March 10
  • Location:UK

Posted 03 October 2012 - 08:46 AM

Seems like the right solution to me.
0

#5 User is offline   Rodrigo Coelho 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 665
  • Joined: 05-August 10
  • Location:Rio de Janeiro, Brazil

Posted 03 October 2012 - 08:56 AM

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.
0

#6 User is offline   Sergiy_Voitovuch 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 16-April 13
  • Location:Ukraine

Posted 19 August 2013 - 09:23 AM

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


add this code to main.php
0

#7 User is offline   kkrieger 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 07-March 14
  • Location:Germany

Posted 07 March 2014 - 03:25 AM

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
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users