How do I send e-mail from my server?

rof3

Member
Aug 31, 2004
119
0
0
I am running Apache and PHP (lastest versions of each) on my PC and want to use PHP's mail() function, but I don't know what to configure or install so that I can. I get the following error:

Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()

I think I need to install a mail server if Apache doesn't have one but I don't really know. Any help appreciated.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Well, you could install your own mail server. I think sendmail is pretty much the standard for linux. With xp you could use the smtp server built into iis.

But even easier would be to find an smtp server somewhere out there that allows you to send mail through it. Your isp probably provides one you can use although you may have to figure out password stuff. You set the relevant info in php.ini but I didn't see anything there about usernames or passwords. Odd....
 

rof3

Member
Aug 31, 2004
119
0
0
I'm on a university campus, and I think the smtp server might be configured only to accept outgoing mail from *@georgetown.edu...as for using the smtp server in IIS, would that conflict with the fact that I'm running Apache?
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Well, since you're probably running apache on port 80 you'd have to make sure that the web server part of iis is either trying to use another port or is disabled altogether.
 

rof3

Member
Aug 31, 2004
119
0
0
OK cool, thanks very much.

In the event that IIS doesn't work, is there a third party mail server for Windows XP anyone can reccomend?