切换导航条
此项目
正在载入...
登录
周海龙
/
mail-serve
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
邓超
about a year ago
提交
d5d38d8f13d24703c312adb9ffa3a4c57873d8f4
1 个父辈
90bc291b
添加端口
显示空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
3 行增加
和
3 行删除
lib/Mail/MailFun.php
lib/Mail/MailFun.php
查看文件 @
d5d38d8
...
...
@@ -157,18 +157,18 @@ class MailFun {
* @time 2023/4/11 9:12
*/
public
static
function
sendEmail
(
array
$data
,
array
$email
){
$smtp
=
self
::
getHostPort
(
$email
[
'smtp'
],
465
);
// 邮件对象
$mail
=
new
PHPMailer
();
//Server settings
$mail
->
SMTPDebug
=
SMTP
::
DEBUG_OFF
;
//调试输出 SMTP::DEBUG_SERVER; //Enable verbose debug output
$mail
->
isSMTP
();
//Send using SMTP
$mail
->
Host
=
$
email
[
'smtp
'
];
//Set the SMTP server to send through
$mail
->
Host
=
$
smtp
[
'host
'
];
//Set the SMTP server to send through
$mail
->
SMTPAuth
=
true
;
//Enable SMTP authentication
$mail
->
Username
=
$email
[
'email'
];
//SMTP username
$mail
->
Password
=
base64_decode
(
$email
[
'password'
]);
//SMTP password
$mail
->
SMTPSecure
=
PHPMailer
::
ENCRYPTION_SMTPS
;
//Enable implicit TLS encryption
$mail
->
Port
=
465
;
//TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS`
$mail
->
Port
=
$smtp
[
'port'
]
;
//TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS`
$mail
->
CharSet
=
'utf-8'
;
$mail
->
Encoding
=
PHPMailer
::
ENCODING_QUOTED_PRINTABLE
;
...
...
请
注册
或
登录
后发表评论