Jump to content
Larry Ullman's Book Forums

Help Needed Configuring External Mailserver For Yii Contact Form


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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...