This commit is contained in:
wangjinlei
2022-08-21 15:47:28 +08:00
parent ff65394c85
commit 6c759de0fb
6 changed files with 322 additions and 137 deletions

View File

@@ -2,6 +2,7 @@
use PHPMailer\PHPMailer\PHPMailer;
use think\Db;
use think\Env;
//use TCPDF;
// +----------------------------------------------------------------------
@@ -67,7 +68,12 @@ function sendEmail($email = '', $title = '', $from_name = '', $content = '', $me
$mail->Subject = $title;
//Read an HTML message body from an external file, convert referenced images to embedded,
//convert HTML into a basic plain-text alternative body
$mail->msgHTML($content);
//组合邮件模板的头尾
$pre = Env::get('emailtemplete.pre');
$net = Env::get('emailtemplete.net');
$mail->msgHTML($pre.$content.$net);
//Replace the plain text body with one created manually
$mail->AltBody = '';
if (is_array($attachmentFile)) {