Hello there Masters.. I have a little problem on my mail() function.. when I send mail the sender is always apache@blabla.com. what I want is when the message is sent the message format is simply like this. from:markii design, to Reciever, message.. here is my code..
<?php
// read the list of emails from the file.
$email_list = file("elist.txt");
// count how many emails there are.
$total_emails = count($email_list);
// go through the list and trim off the newline character.
for ($counter=0; $counter<$total_emails; $counter++) {
$email_list[$counter] = trim($email_list[$counter]);
}
// implode the list into a single variable, put commas in, apply as $to value.
$to = implode(",",$email_list);
$subject = "My email test.";
$message = "Hello, how are you markii?";
$sender = "markii-designs";
if ( mail($to,$subject,$message,"From: $sender \n") ) {
echo "The email has been sent again!";
} else {
echo "The email has failed!";
}
?>
//PHP newbie..