Yii Framework Forum: Erro Ao Se Cadastrar - Yii Framework Forum

Jump to content

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

Erro Ao Se Cadastrar Rate Topic: -----

#1 User is offline   Loine 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 01-July 14

Posted 01 July 2014 - 03:39 PM

Sou iniciante com o Yii, eu tentei me cadastrar e estou com problema na porta 25 de smtp.

PHP warning

mail() [<a href='function.mail'>function.mail</a>]: Failed to connect to mailserver at &quot;localhost&quot; port 25, verify your &quot;SMTP&quot; and &quot;smtp_port&quot; setting in php.ini or use ini_set()

C:\wamp\www\public_html\coliseu\protected\controllers\SiteController.php(67)

55 if(isset($_POST['ContactForm']))
56 {
57 $model->attributes=$_POST['ContactForm'];
58 if($model->validate())
59 {
60 $name='=?UTF-8?B?'.base64_encode($model->name).'?=';
61 $subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';
62 $headers="From: $name <{$model->email}>\r\n".
63 "Reply-To: {$model->email}\r\n".
64 "MIME-Version: 1.0\r\n".
65 "Content-Type: text/plain; charset=UTF-8";
66
67 mail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);
68 Yii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');
69 $this->refresh();
70 }
71 }
72 $this->render('contact',array('model'=>$model));
73 }
74
75 /**
76 * Displays the login page
77 */
78 public function actionLogin()
79 {

Se alguém poder me ajudar ficaria muito grato.

Att,

Rony Franck
0

#2 User is offline   Edson Rodrigues 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 378
  • Joined: 10-August 10

Posted 01 July 2014 - 08:03 PM

View PostLoine, on 01 July 2014 - 03:39 PM, said:

Sou iniciante com o Yii, eu tentei me cadastrar e estou com problema na porta 25 de smtp.

PHP warning

mail() [<a href='function.mail'>function.mail</a>]: Failed to connect to mailserver at &quot;localhost&quot; port 25, verify your &quot;SMTP&quot; and &quot;smtp_port&quot; setting in php.ini or use ini_set()

C:\wamp\www\public_html\coliseu\protected\controllers\SiteController.php(67)

55 if(isset($_POST['ContactForm']))
56 {
57 $model->attributes=$_POST['ContactForm'];
58 if($model->validate())
59 {
60 $name='=?UTF-8?B?'.base64_encode($model->name).'?=';
61 $subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';
62 $headers="From: $name <{$model->email}>\r\n".
63 "Reply-To: {$model->email}\r\n".
64 "MIME-Version: 1.0\r\n".
65 "Content-Type: text/plain; charset=UTF-8";
66
67 mail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);
68 Yii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');
69 $this->refresh();
70 }
71 }
72 $this->render('contact',array('model'=>$model));
73 }
74
75 /**
76 * Displays the login page
77 */
78 public function actionLogin()
79 {

Se alguém poder me ajudar ficaria muito grato.

Att,

Rony Franck



A porta 25 não se usa mais no provedores de envio, hoje esta usando a porta 587. Verifique as configurações do seu PHP.INI
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