Phpmailer's body does not support while tracking?

$mail= new PHPMailer();
    $mail->IsSMTP();
    $mail->SMTPAuth = true;
    $mail->SMTPSecure = "ssl";
    $mail->Host = "smtp.gmail.com";
    $mail->Port = 465;
    $mail->CharSet = "utf8";
    $mail->Body = "".$row."";

that"s fine
but not while:

$mail= new PHPMailer();
    $mail->IsSMTP();
    $mail->SMTPAuth = true;
    $mail->SMTPSecure = "ssl";
    $mail->Host = "smtp.gmail.com";
    $mail->Port = 465;
    $mail->CharSet = "utf8";
    $mail->Body = "".while($row = mysqli_fetch_array($data)){}."";
    

this is the only way to report, so I can"t write

.

how do you put information on body?
because I want to print data and send it to customers, there are many, so I have to use while

Apr.05,2021

er. Brother, you can create a new variable

while($row = mysqli_fetch_array($data)){
    $body .= $data;
}

doubt: is this pseudo code or something

while you did not do the output, how to concatenate the string?

process the body content directly outside, and then assign a value to $mail- > Body


well, phpmailer said, this pot is so black

Menu