PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Thu Dec 18, 2014 6:28 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon May 28, 2007 11:57 am 
Offline
Forum Newbie
User avatar

Joined: Wed May 23, 2007 12:13 pm
Posts: 24
Location: Manila, Philippines
I'm running IIS & WAMP on my PC. The tutorial on installing WAMP says to change my port to 8080 (so I type http://localhost:8080 on my browser when I'm using PHP) to get both IIS & WAMP to work (which I've managed to do).

The problem is that I think (do correct me if I'm wrong) SMTP port 25 'belongs' to IIS because PHP mail refuses to work with this setting... There is nothing in the WAMP homepage about changing the SMTP port to some other value, though.

Help, anyone? Thank you.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 28, 2007 12:10 pm 
Offline
DevNet Master
User avatar

Joined: Wed Dec 06, 2006 5:14 pm
Posts: 3635
Location: Toronto, Canada
I'd be willing to bet it's probably because you don't have an outgoing SMTP server defined (or defined properly) - the IIS mail server would still need to connect to another SMTP server to send the mail somewhere, and most ISPs block this traffic for spam reasons.

Try setting your ISP's SMTP server in php.ini

find:
Syntax: [ Download ] [ Hide ]
[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

and change to:
Syntax: [ Download ] [ Hide ]
[mail function]
; For Win32 only.
SMTP = smtp.yourISP.com
smtp_port = 25

and see if that works..

alternatively, you can use ini_set() to set these at runtime:
Syntax: [ Download ] [ Hide ]
ini_set('sendmail_from','you@domain.com');

ini_set('SMTP','smtp.yourISP.com');

ini_set('smtp_port','25');

mail('test@domain.com', 'test subject', 'this is a test message!');

Worked for me when I just tried it, but your mileage may vary.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 28, 2007 12:26 pm 
Offline
Forum Newbie
User avatar

Joined: Wed May 23, 2007 12:13 pm
Posts: 24
Location: Manila, Philippines
My SMTP was set to localhost: 8080 (which I thought was the correct setting, oops!).. I set it to my ISP smtp & it worked.

Thank you, Kieran Huggins :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Yahoo [Bot] and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group