Jump to content
Larry Ullman's Book Forums

Help Needed Configuring External Mailserver For Yii Contact Form


zubo
 Share

Recommended Posts

Hi

 

Not having any help at yii forums hoped someone here might take pity:

 

I was trying to test the contact form and got the following error

 

14:36:42.101721 error php

 

mail() [<a href='function.mail'>function.mail</a>]: Failed to connect to

mailserver at "localhost" port 25, verify your "SMTP"

and "smtp_port" setting in php.ini or use ini_set()

(C:\wamp\www\yiiroot2\testdrive\protected\controllers\SiteController.php:61)

Stack trace:

#0 C:\wamp\www\yiiroot2\framework\web\CController.php(309):

CInlineAction->runWithParams()

#1 C:\wamp\www\yiiroot2\framework\web\CController.php(287):

SiteController->runAction()

#2 C:\wamp\www\yiiroot2\framework\web\CController.php(266):

SiteController->runActionWithFilters()

#3 C:\wamp\www\yiiroot2\framework\web\CWebApplication.php(276):

SiteController->run()

#4 C:\wamp\www\yiiroot2\framework\web\CWebApplication.php(135):

CWebApplication->runController()

#5 C:\wamp\www\yiiroot2\framework\base\CApplication.php(162):

CWebApplication->processRequest()

#6 C:\wamp\www\yiiroot2\testdrive\index.php(13): CWebApplication->run()

REQUEST_URI=/Yiiroot2/testdrive/index.php/site/contact

in C:\wamp\www\yiiroot2\testdrive\protected\controllers\SiteController.php

(61)

in C:\wamp\www\yiiroot2\testdrive\index.php (13)

 

so looking at an answer in google ... the suggestion was to set

 

[mail function]

; For Win32 only.

; http://php.net/smtp

SMTP = mail.geosz.com

; http://php.net/smtp-port

smtp_port = 25

 

where my smtp is my remote smtp mail server

 

i also set a parameter for sendmail_from = george@geosz.com

 

so i am puzzled why i get the error

 

anyone help me??

 

george

Link to comment
Share on other sites

Well, to be clear, this isn't a Yii issue but a PHP-mail one. I suspect the code you've posted won't work because mail.geosz.com probably requires authentication--username and password. That's not possible just by editing the php.ini file.

 

Do you have an ISP you're using whose SMTP server doesn't require authentication?

Link to comment
Share on other sites

 Share

×
×
  • Create New...