0

This is related to an IIS server problem, or a PHP configuration, not php code.

I'm running an IIS6 server with PHP installed on it, the following php code will never send an email:

mail("[email protected]", "hi", "thanks"); //...mail(address, subject, message)

The server this is running under has a valid SMTP server, I know because I can telnet to localhost:25 and send emails by directly talking to the protocol, so that's not an issue.

However, this code won't send. I've looked at my php.ini file, and it looks like it's all correct to me also:

[mail function] SMTP = localhost smtp_port = 25 

edit: I can confirm that programming that speaks to the socket with the SMTP protocol also works, but the mail() function still refuses.

2 Answers 2

1

If you are using Authentication in your php.ini file then you need to use SMTP authenticate Scripts to send out the mail from the server.

0

check to see if you smtp service is running on the server.

easiest way is to open a command window, start -> run -> cmd

telnet localhost 25

see if you get any response, if not you need to start your smtp service.

1
  • I mentioned I could telnet into the service in my question. Commented Nov 16, 2010 at 21:12

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.