|
Posted by Erwin Moller on 04/04/06 11:09
universalbitmapper wrote:
> Hi,
>
> I'm trying to send an e-mail from a .php script and ie6 returns this
> error:
>
> Warning: mail() [function.mail]: Failed to connect to mailserver at
> "localhost" port 25, verify your "SMTP" and "smtp_port" setting in
> php.ini or use ini_set() in C:\wamp\www\PAMWD\chap11email\sendmail.php
> on line 12
Yes, the IIS return such an error (not IE) when it cannot connect to a
smtp-gateway.
>
> I checked php.ini (line 606):
>
> [mail function]
> ; For Win32 only.
> SMTP = localhost
That is wrong
the next line should be
smtp_port = 25
At least that is in every single php.ini file I ever saw. :-)
>
> OTOH I didn't find "smtp_port" in php.ini
>
> Maybe I should add :80 as port in php.ini?
Huh?
port 80 is NOT for smtp.
port 80 is typically used for http.
use 25 for smtp.
And also: Are you sure you are running software on your localhost that
accepts smtp-commands?
If you are unsure, make the smtp-gateway something that you know to work,
like your own ISP-smtp-gateway.
Regards,
Erwin Moller
Navigation:
[Reply to this message]
|