Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I send mail within PHP?

Status
Not open for further replies.

MrJspeed

Programmer
Apr 28, 2002
2
US
Yeah, well... I'm not as dumb as my question suggests.

I can use the mail() function all fine and well on a 3rd party server that I ftp my php to, and the email works fine.

But, for development purposes, I want to be able to send mail from my OWN computer. Right now I'm just developing my site, and I'm running a WIN2K machine with the latest versions of PHP 4, MySQL, and Apache. PHP and database wise, everything is running smoothly. However, I just want to get the mail function to work from my own computer. I believe you have to edit an .ini file somewhere, but I'm not sure. I'd like someone who knows to help me out! Thanks!
 
Hi mate,

You will need to edit the php.ini (Winodows Dir) file and change the following..

[mail function]
; For Win32 only.
SMTP= smtp.mydomain.com ; for Win32 only

; For Win32 only.
sendmail_from= webmaster@mydomain.com ; for Win32 only

You may also need to install a mail server but I am not sure as I have never tried it without one.. Set the SMTP server to resolve to your local mail server.

That should be it, let me know how you get on..

Hope this helps Wullie

 
well, I downloaded and installed a mail server...

It says my host name is "mrjspeed" and the port is port 25.

I edited my php.ini file as you said, and it doesn't work. I don't know what to do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top