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.
Что делать? Как решить проблему?
Спасибо!
Всем привет! Вот уже 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.
Что делать? Как решить проблему?
Спасибо!