How to send mails through php script?

前端 未结 8 1068
半阙折子戏
半阙折子戏 2021-01-01 08:02

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++)
           


        
8条回答
  •  心在旅途
    2021-01-01 08:10

    first do

    echo $result = mail($to,$subject,$txt,$headers);
    

    and see what u get , error ?

    I recommend to use a class such phpMailer

    why you have comma in the end of ths line ?

    $email = $v->item($k)->nodeValue . ",";
    

    you send to one mail every time.

提交回复
热议问题