Проблема с функцией mail()

Morrow

Новичок
Проблема с функцией mail()

Всем привет! Вот уже 2-й день не могу решить проблему с посылкой писем. Весь интернет перерыл - никакая информация не помогает. В основном, все касается настройки почты под Linux, а у меня Windows...
Так вот, что я имею:

1. Windows XP SP2
2. Xampp Lite 1.4.16


Пишу следующий код:

<?php

mail("[email protected](существующий адресс)","Hello!","message","From: [email protected](существующий адресс)");

?>

После активации скрипта интерпретатор выдает ошибку:

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:\xampplite\htdocs\blank.php on line 5

В файле php.ini у меня прописано:

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
; sendmail_from =

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; sendmail_path = "\xampplite\sendmail\sendmail.exe -t"

; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =


Пробовал всячески изменять файл php.ini добавлять разные порт и smtp, также открыть путь sendmail_path и sendmail_from - результат - ноль, та же ошибка.

Вхожу в телнет, набираю команду:

telnet localhost 25

выдает ошибку: could not open connection to the host, port 25. Connection failed...

или (на другом компе для проверки)

could not open connection to the host, port 25. No connection could be made because the target machine actively refused it.

Что делать? Как решить проблему?

Спасибо!
 

Morrow

Новичок
Автор оригинала: tony2001
открыть мануал и прочесть.
[m]mail[/m]
Я эту тему читал 10000000 раз - нету там ответа! Ткните пальцем, если есть! :( Кто знает, как проблему устранить?
 

tony2001

TeaM PHPClub
Замечание: The Windows implementation of mail() differs in many ways from the Unix implementation. First, it doesn't use a local binary for composing messages but only operates on direct sockets which means a MTA is needed listening on a network socket (which can either on the localhost or a remote machine).
 

slach

Новичок
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:\xampplite\htdocs\blank.php on line 5

тебе русским языком прописали
у тебя на 25м порту на localhost НЕТУ SMTP сервера который твою почту мог бы отправить

в чем проблема поставить IIS и SMTP сервис в винде?
 
Сверху