giroy
giroy

Reputation: 2243

How to setup apache and php to make mail() function work on local machine

I am using php's mail() function to send an email from a php scrpit, however, this is not working. I believe the problem is with my php setup and the lack of an smtp server. Does anyone have experience with setting something like this up on a local machine and what can be done to fix this? Thank you

Upvotes: 1

Views: 1917

Answers (1)

Sergei
Sergei

Reputation: 2757

Yes I have on Windows machine. You should install local mail server, for example ArGoSoft Mail Server (www.argosoft.com). It's free, small and simple. Then setup a local domain in settings (for example weblocal.dom), then add a mail user (for example admin). So your test email will be [email protected]. Then you just add this mail account to your email client program and send some mail to it from PHP script.

Upvotes: 1

Related Questions