|
@@ -2,10 +2,10 @@
|
|
|
/*
|
|
|
* @Descripttion:
|
|
|
* @version: X3版本
|
|
|
- * @Author: 吴胭脂
|
|
|
+ * @Author: likang
|
|
|
* @Date: 2022-06-07 10:16:16
|
|
|
- * @LastEditors: 吴胭脂
|
|
|
- * @LastEditTime: 2022-06-08 15:43:33
|
|
|
+ * @LastEditors: sueRimn
|
|
|
+ * @LastEditTime: 2022-06-09 09:23:55
|
|
|
*/
|
|
|
|
|
|
namespace catchAdmin\email\model;
|
|
@@ -44,10 +44,8 @@ class Email extends Model
|
|
|
return (string) $this->getData('status');
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- /**
|
|
|
- *
|
|
|
- */
|
|
|
+
|
|
|
+
|
|
|
public function setEmail($emails,$title,$body)
|
|
|
{
|
|
|
$where= [];
|
|
@@ -84,8 +82,8 @@ class Email extends Model
|
|
|
// $mail->addAttachment('../xy.zip'); // 添加附件
|
|
|
// $mail->addAttachment('../thumb-1.jpg', 'new.jpg'); // 发送附件并且重命名
|
|
|
$mail->isHTML(true); // 是否以HTML文档格式发送 发送后客户端可直接显示对应HTML内容
|
|
|
- $mail->Subject = '系统警告';
|
|
|
- $mail->Body = '<h1>这里是邮件内容</h1>' . date('Y-m-d H:i:s');
|
|
|
+ $mail->Subject = $title;
|
|
|
+ $mail->Body = $body;
|
|
|
$mail->AltBody = '如果邮件客户端不支持HTML则显示此内容';
|
|
|
$mail->send();
|
|
|
echo '邮件发送成功';
|