PhP mail and SMTP

In one of my php scripts there is suppose to be a email of activation send out when somebody sings up. I have tried different email address and I get no activation from the my site.

I have been reading about SMTP and have no idea what that does.
I looked in to the php.ini and have no idea what to look or change. I run a couple of websites so I don’t know if i canhge something will it affect another.

Running
windows 2000 sever
mysql
php lastest recommended

Make sure you have relaying turned on in Windows. If not, no mail is going out. Also, most PHP functions will return a value. In the case of mail(), it returns a TRUE or FALSE on success or failure. So you can do aif(mail(yada)) { echo "Mailed was successful.<br>n"; } else { echo "Mail failed."; }
(Yada would me your normal mail() stuff, just use the mail() you have now, but put it in the if statement. After backing up your current page… hehe.)

I’d also check my event logs and see what’s happening. I know I’ve had relaying problems with Windows before.

Were would be turning on the relay on windows and were would I put this code you gave me?

can anybody help me with this problem.

Are you getting any kind of error on the page? It will tell you if it’s a relay problem.

The relaying problem is mainly an exchange thing. If you’re not running Exchange, make sure you are actually running SMTP in IIS, so that you are actually a mail server and can send.

I’m getting no error page and nothing in the event log. I’m not running excahnge using SMTp thru IIS. However I believe that it’s something in the php.ini that is not set right under the mail function or SMTP in the IIS is not set right.

Any help in this please.

Make sure your SMTP is set up in php.ini

[mail function] ; For Win32 only. SMTP =1.1.1.1
Where 1.1.1.1 is your IP or Mailserver.

This is what I got under Php.ini

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

; For Win32 only.
sendmail_from = [email protected] ; for Win32 only

Under SMTP= I put the server name, correct.
SMTP_PORT = I put the port which is 25 by deafult, correct.

What about sendmail

help please

You probably don’t have an SMTP server running under windows. Change localhost for your ISP’s SMTP server.

How do I make it work under wondows. Why would I have to change it to my IPS SMTP, and how do I do that.

To send emails, you need a mail server. You don’t have one, your ISP does.

How to do it? Just read my previous message.

I just bought excahnge server 4.0 will that help for to get my email working?

Sponsor our Newsletter | Privacy Policy | Terms of Service