WAMP question localhost set to 8080

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
violet
Forum Newbie
Posts: 24
Joined: Wed May 23, 2007 12:13 pm
Location: Manila, Philippines
Contact:

WAMP question localhost set to 8080

Post by violet »

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.
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

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:

Code: Select all

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25
and change to:

Code: Select all

[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:

Code: Select all

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.
User avatar
violet
Forum Newbie
Posts: 24
Joined: Wed May 23, 2007 12:13 pm
Location: Manila, Philippines
Contact:

Post by violet »

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 :)
Post Reply