$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.'';
這樣可以
但是 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)){}.'';
光這樣就報錯了,所以我沒辦法繼續寫
請問要怎麼在 body 放上循環?
因為我要打印數據寄給客戶,有多個,所以得用 while
守着星空守着你
慕神8447489