How to send mails through php script?

Posted by Zeeshan Rang on Stack Overflow See other posts from Stack Overflow or by Zeeshan Rang
Published on 2009-06-29T15:05:15Z Indexed on 2010/04/04 20:53 UTC
Read the original article Hit count: 422

Filed under:
|
|

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

© Stack Overflow or respective owner

Related posts about php

Related posts about mail