Sending mail problem

the mail() function

Moderators: macek, egami, gesf

User avatar
planketa
New php-forum User
New php-forum User
Posts: 152
Joined: Mon Mar 08, 2004 12:29 am
Location: Philippines

Sending mail problem

Postby planketa » Thu Jan 05, 2006 7:27 pm

Guys, I need help with sending mail

I have this test script

Code: Select all

<?php

mail("dracho@adb.org","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 dracho@adb.org in F:\wwwroot\testmail.php on line 3

I checked my php.ini

Code: Select all

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

; For Win32 only.
;sendmail_from = me@example.com

; 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.

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

Postby ruturajv » Sun Jan 08, 2006 8:40 pm

u need to add the Relay IP of 127.0.0.1 in your IIS's SMTP server settings, rest would be fine.

User avatar
planketa
New php-forum User
New php-forum User
Posts: 152
Joined: Mon Mar 08, 2004 12:29 am
Location: Philippines

Postby planketa » Sun Jan 08, 2006 9:04 pm

hey thanks for the reply. but I dont think i know how to do that. please help, thanks

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

Postby ruturajv » Mon Jan 09, 2006 8:43 pm

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, 127.0.0.1, [whatever your ip]
  • And that should be it.

User avatar
planketa
New php-forum User
New php-forum User
Posts: 152
Joined: Mon Mar 08, 2004 12:29 am
Location: Philippines

Postby planketa » Mon Jan 09, 2006 9:16 pm

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.

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

Postby ruturajv » Tue Jan 10, 2006 8:17 pm

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"

User avatar
planketa
New php-forum User
New php-forum User
Posts: 152
Joined: Mon Mar 08, 2004 12:29 am
Location: Philippines

Postby planketa » Tue Jan 10, 2006 9:43 pm

I think its a default by IIS. I have not installed any SMTP server.

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

Postby ruturajv » Thu Jan 12, 2006 8:24 pm

then yours IS a standard Windows SMTP sever

User avatar
Alexej Kubarev
Site Admin
Site Admin
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län
Contact:

Postby Alexej Kubarev » Thu Jan 12, 2006 11:40 pm

try using MDaemon or such.. works like a charm


Return to “PHP coding => Mail”

Who is online

Users browsing this forum: No registered users and 2 guests