如何发送电子邮件模板 html 页面?
how to send email template html page?
Im using PHPMAILER 5.2.7 !
$to=$row['email'];
$at=$row['updated_at'];
$subject = "Your Password has been changed";
$body = "<body background='red' style='bgcolore:red;'><p>Hello < ".$u." > your password has been
changed at ".$at." ! </p>";
$SITEEMAIL='support@test.tn';
$mail = new Mail();
$mail->setFrom($SITEEMAIL);
$mail->addAddress($to);
$mail->subject($subject);
$mail->body($body);
$mail->send();
how can i switch the $body content with a html page (template) ?? tried to directly past the code inside $body but i dosen't work !
我在您的 $body 文本中看到一些奇怪的东西,请先尝试使用此示例中更简单的内容。 github.com/PHPMailer/PHPMailer#a-simple-example
无论如何,您也应该在发送前调用$mail->isHTML(true);
。
Im using PHPMAILER 5.2.7 !
$to=$row['email'];
$at=$row['updated_at'];
$subject = "Your Password has been changed";
$body = "<body background='red' style='bgcolore:red;'><p>Hello < ".$u." > your password has been
changed at ".$at." ! </p>";
$SITEEMAIL='support@test.tn';
$mail = new Mail();
$mail->setFrom($SITEEMAIL);
$mail->addAddress($to);
$mail->subject($subject);
$mail->body($body);
$mail->send();
how can i switch the $body content with a html page (template) ?? tried to directly past the code inside $body but i dosen't work !
我在您的 $body 文本中看到一些奇怪的东西,请先尝试使用此示例中更简单的内容。 github.com/PHPMailer/PHPMailer#a-simple-example
无论如何,您也应该在发送前调用$mail->isHTML(true);
。