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