Sending mail problem



Guys, I need help with sending mail

I have this test script


mail("","Test","this is a test mail","dexter");


And when i run the page i get this error

Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for in F:\wwwroot\testmail.php on line 3

I checked my php.ini

[mail function]
; For Win32 only.
SMTP = localhost; for Win32 only
sendmail_from=; for Win32 only

; For Win32 only.
;sendmail_from =

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =

I did not change anything from the IIS because I am not familiar with the settings.

Please help. Thanks.
u need to add the Relay IP of in your IIS's SMTP server settings, rest would be fine.
hey thanks for the reply. but I dont think i know how to do that. please help, thanks
Do this
  • Goto "Run" , type "inetmgr"
  • goto smtp , right click and select properties
  • Select the Access tab
  • Click "Relay" button
  • Select radio "Only the list below"
  • Add localhost,, [whatever your ip]
  • And that should be it.
thanks man. but I got a different smtp here. it says Default SMTP Virtual Server. When i right clicked on it there's no relay.
Have you installed a different SMTP server ? or its' Window's default one (One that can be managed by IIS)
IIS also defines its SMTP as "Default SMTP Virtual Server"
I think its a default by IIS. I have not installed any SMTP server.