:이 스크립트에서PHP 메일() 작동하지 윈도우 2003, IIS SMTP
PHP Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for [email protected] in c:\inetpub\wwwroot\mailtest.php on line 12
: 서버의 php.ini 파일에서
<?php
$to = "[email protected]";
$subject = "test";
$body = "this is a test";
if (mail($to, $subject, $body)){
echo "mail sent";
}
else {
echo "problem";
}
?>
섹션
를[mail function]
; For Win32 only.
SMTP = server.domain.com; for Win32 only
smtp_port = 25
; For Win32 only.
sendmail_from = [email protected]
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =
("서버"및 "도메인"은 실제 서버 및 도메인 이름을 정확하게 나타냅니다)
IIS에서 SMTP가 실행 중입니다. "Access"
탭에서 컴퓨터가이 가상 서버를 통해 릴레이 할 "Relay"
버튼, 선택은 checkbox "only the list below"
로 설정하고 서버가 Windows Server 2003 Service Pack 2
를 실행 "127.0.0.1(xxx.xxx.xxx.xxx)" (x's representing actual server IP address).
목록에 나는 그것이 가정 완전히 오후 5시 9 월 1 일 2008 년으로 패치입니다 IIS7
(확인하는 방법?)을 실행 중입니다.
아이디어가 있으십니까?
응답 시간이 Espo 인 경우 :이 컴퓨터는 데이터 센터에서 호스팅됩니다. 우리는 gmail 계정을 사용하고 싶지 않습니다. Windows server 2003은 자체 SMTP 서버와 함께 제공됩니다.
업데이트 : Yaakov Ellis의 조언에 따라 모든 릴레이 제한을 삭제하고 제공된 IP 주소 버튼을 사용하여 허용 된 목록에 서버 IP를 추가 했으므로 작동이 시작되었습니다.
나를 도와 주신 Espo와 Yaakov에게 감사드립니다.