IIS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationIIS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 4th, 2004, 05:56 AM
guide1981 guide1981 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 126 guide1981 Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 1 Day 6 h 29 m 35 sec
Reputation Power: 0
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.

Reply With Quote
  #2  
Old August 4th, 2004, 06:37 AM
guide1981 guide1981 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 126 guide1981 Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 1 Day 6 h 29 m 35 sec
Reputation Power: 0
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");
?>

Reply With Quote
  #3  
Old August 4th, 2004, 03:06 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,829 Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 20 h 23 m 12 sec
Reputation Power: 765
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

Reply With Quote
  #4  
Old August 30th, 2004, 04:47 AM
McKenna's Avatar
McKenna McKenna is offline
Purple is a Fruit
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Ireland
Posts: 404 McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)McKenna User rank is First Lieutenant (10000 - 20000 Reputation Level)  Folding Points: 64838 Folding Title: Intermediate FolderFolding Points: 64838 Folding Title: Intermediate FolderFolding Points: 64838 Folding Title: Intermediate FolderFolding Points: 64838 Folding Title: Intermediate Folder
Time spent in forums: 3 Days 2 h 8 m 13 sec
Reputation Power: 164
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
Comments on this post
degsy agrees!

Reply With Quote
  #5  
Old May 30th, 2005, 01:57 AM
starved starved is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2005
Posts: 1 starved User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 m 10 sec
Reputation Power: 0
mail(): SMTP server response: a simple fix in xp x32.... simple to rectify

Quote:
Originally Posted by guide1981
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.


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

Reply With Quote
  #6  
Old August 1st, 2005, 02:22 PM
degsy degsy is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2001
Posts: 1,882 degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 Days 21 h 19 m 30 sec
Reputation Power: 13
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.

Reply With Quote
  #7  
Old October 22nd, 2005, 10:46 PM
peter neubauer peter neubauer is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2005
Posts: 1 peter neubauer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 14 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationIIS > i can't mail() from IIS/SMTP


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway