how to send mail from localhost
Posted: Tue Sep 27, 2011 4:01 am
$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!
$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!