Re: [function mail() Windows XP]SMTP localhost
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: [function mail() Windows XP]SMTP localhost

From: Erwin Moller <since_humans_read_this_I_am_spammed_too_much@spamyourself.com>
Date: Tue Apr 04 2006 - 10:09:06 CEST

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
Received on Mon May 1 02:47:51 2006