How to send mails through php script?
- by Zeeshan Rang
Hello everyone.
How can i send mails through the php script??
I am trying to do somthing like this:
for($k=0;$k<=$x->length-1;$k++)
{
for($l=0;$l<=$j-1;$l++)
{
if($y->item($k)->nodeValue==$JobNoArr[$l] && $AcceptanceDateArr[$l]=='0000-00-00')
{
//echo $v->item($k)->nodeValue ;
$email = $v->item($k)->nodeValue . ",";
$to = $email;
$subject = "My subject";
$txt = "Hello world!";
$headers = "From: [email protected]" . "\r\n" .
"CC: [email protected]";
mail($to,$subject,$txt,$headers);
}
}
}
Please help me in this issue.
Best
Zeeshan