Page 1 of 1

how to send mail from localhost

Posted: Tue Sep 27, 2011 4:01 am
by siko
$to = "siko@gmail.com;

$subject = "Testing";
$message = "Test";
$headers = 'From: noreply@ siko.com' . "\r\n" . 'Reply-To: noreply@ siko.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);

This is my code for sending an email from my web host. I recently setup a localhost to work from, and I realized that this does not work on my localhost.

I did manual installation of apache, php and mysql individually, and I think I'm suppose to install a mail server locally or something like that, but I'm kinda lost.

If so, which mail server should I go for?

Any advices?

Thanks in advance!

Re: how to send mail from localhost

Posted: Tue Sep 27, 2011 8:55 pm
by Doug G
Windows or linux or something else?

Re: how to send mail from localhost

Posted: Tue Sep 27, 2011 11:08 pm
by siko
Ah, forgot to mention that, I'm on Mac os x, Lion to be exact.

Regards