|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
i can't mail() from IIS/SMTP
i always get this error when i use
<?php mail("joecool@example.com", "My Subject", "Line 1\nLine 2\nLine 3"); ?> Warning: 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:\inetpub\wwwroot\misc\mail.php on line 2 i can't get email from locahost SMTP to my account at mail.mydomain.com php.ini configuration: SMTP = localhost sendmail_from = me@localhost.com SMTP service is running on Windows 2003 IIS; connected to dial-up; windows logon is Administrator/two anyone there2quickly troubleshoot? please help we are using php 4.3.2 on windows 2003 server. i see 'FastCGI Enabled' message on top of phpinfo() page server API CGI/FastCGI ( this i see in o/p of phpinfo() ) all files of php engine r in c:\php4folder 'c:\php4' also contains a folder nanmed 'php' we've a php.ini file in C:/windows is it not possible to send mail from localhost 2 other domain is this information sufficient? please answer. |
|
#2
|
|||
|
|||
|
with few modifications, i m getting error:
Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for xyz@somedomain.com in c:\inetpub\wwwroot\misc\mail.php on line 2 code of file: <?php mail("xyz@somedomain.com", "My Subject", "Line 1\nLine 2\nLine 3"); ?> |
|
#3
|
|||
|
|||
|
Look around in the IIS MMC settings for your SMTP server, there is probably some setting you need to change to let your code mail be "relayed" through the SMTP server. I don't use 2003 but perhaps someone that does knows the exact answer.
__________________
====== Doug G ====== "Hide, hide witch! The good folk come to burn thee. Their keen enjoyment hid behind their gothic mask of duty." -Mark Clifton |
|
#4
|
||||
|
||||
|
Hey Guide,
I'd be interested to know what changes you made to get from "Failed to connect to mailserver" to "SMTP server response: 550". I am experiencing the same problems with FastCGI. The SMTP service is running and is on port 25, and I have SMTP = localhost in my PHP.ini. I can send mail from ASP so there seems to be no problem with the service. Anyway, to solve the error 550 from the SMTP service go to [On XP anyway, I'm sure it's similar enough on Win2003] Control Panel -> Administrative Tools -> Internet Information Services. Go to properties for the SMTP virtual server and choose the access tab. The bottom choice should be Relay. Click relay, then click add, choose single computer from the list and enter the IP 127.0.0.1 and you should be able to send mail via IIS. Thanks |
|
#5
|
|||
|
|||
|
mail(): SMTP server response: a simple fix in xp x32.... simple to rectify
Quote:
Hay.. I had the same thing its a two minute fix... Win XP 32 bit system Go To Control Panel.. Administrative Tools.. Internet Information Services.. Expand the local Title (PC).. Right Click on Default SMTP virtual Server then down to Properties.. accross to Access.. down to Connection.. two choices are here and yours will be set to Only the list below... CHANGE that to ALL Except the list below.. then hit OK / Apply etc etc and get right back top the Destop then Restart your server.. maybe even PC is a smarter choice.. all should be working from there... GOOD LUCK and let me know how ya go .. Starved !! and yeah I am hungry.. ![]() starved_1@yahoo.com |
|
#6
|
|||
|
|||
|
cheers. this help me out.
I would agree with ebow though about adding the IP and restricting the rest. Just seems safer ![]() Last edited by degsy : August 1st, 2005 at 02:54 PM. |
|
#7
|
|||
|
|||
|
I got the same error message, when i tried to send email from
php's mail() function as an extension to iis 5.x. 2 hours later, gone through every setting in iis and phps configuration files, i noticed it was all a problem of firewall permissions on "Com Surrogate" sending information outbound. i know that's a quite simple problem, but it's just a suggestion saving some time on looking through the different settings. peace, peter neubauer |
![]() |
| Viewing: Dev Shed Forums > System Administration > IIS > i can't mail() from IIS/SMTP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|