webjoker
01-18-2012, 04:43 PM
Hello,
what i am trying to do is too send an email at my localhost adress.
This is my code:
<?php
$to = "somebody@mail.com";
$subject = "My subject";
$txt = "Hello world!";
$headers = "From: somebodyelse@mail.com" . "\r\n" .
"CC: somebodyelse@example.com";
mail($to,$subject,$txt,$headers);
?>
But when i am trying to do that all it says is "Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port " Well... here is my question then, does someone know what i am doing wrong? :)
Would really love some help because i hope to get this mail stuff work as soon as possible!
Regards: Webjoker :)
what i am trying to do is too send an email at my localhost adress.
This is my code:
<?php
$to = "somebody@mail.com";
$subject = "My subject";
$txt = "Hello world!";
$headers = "From: somebodyelse@mail.com" . "\r\n" .
"CC: somebodyelse@example.com";
mail($to,$subject,$txt,$headers);
?>
But when i am trying to do that all it says is "Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port " Well... here is my question then, does someone know what i am doing wrong? :)
Would really love some help because i hope to get this mail stuff work as soon as possible!
Regards: Webjoker :)