Toggle navigation
Toggle navigation
This project
Loading...
Sign in
OnePoem
/
OnePoem-Server
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
李帅
2022-03-30 23:13:36 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
984bfee1c7e86ee12670b6380432168747a75a7f
984bfee1
1 parent
2724ddd7
1.测试邮件发送
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
app/Jobs/SendVerificationMessage.php
app/Jobs/SendVerificationMessage.php
View file @
984bfee
...
...
@@ -45,25 +45,24 @@ class SendVerificationMessage implements ShouldQueue
$redis
->
setex
(
$this
->
email
,
1800
,
$code
);
//过期时间30分钟
$api
=
'http
s://api.sendcloud.net/apiv2/mail/send
'
;
$api
=
'http
://api.sendcloud.net/apiv2/mail/sendtemplate
'
;
$API_USER
=
'mofunsky_noreply'
;
$API_KEY
=
'8EkR0XnMuJn6V5yQ'
;
$from
=
'noreply@mofunsky.com'
;
$vars
=
json_encode
(
array
(
"to"
=>
array
(
$this
->
email
),
"sub"
=>
array
(
'%code%'
=>
array
(
$code
),
),
));
$from
=
'noreply@yiyan.pub'
;
$vars
=
json_encode
(
array
(
"to"
=>
array
(
$this
->
email
),
"sub"
=>
array
(
"%code%"
=>
Array
(
$code
))
)
);
$param
=
array
(
'api
_u
ser'
=>
$API_USER
,
// 使用api_user和api_key进行验证
'api
_k
ey'
=>
$API_KEY
,
'api
U
ser'
=>
$API_USER
,
// 使用api_user和api_key进行验证
'api
K
ey'
=>
$API_KEY
,
'from'
=>
$from
,
// 发信人,用正确邮件地址替代
'from
n
ame'
=>
'Parlando'
,
'
substitution_vars
'
=>
$vars
,
'template
_invoke_n
ame'
=>
'parlando_mail_verify'
,
'from
N
ame'
=>
'Parlando'
,
'
xsmtpapi
'
=>
$vars
,
'template
InvokeN
ame'
=>
'parlando_mail_verify'
,
'subject'
=>
'[Parlando] Register Verify'
,
'resp
_email_i
d'
=>
'true'
'resp
EmailI
d'
=>
'true'
);
$data
=
http_build_query
(
$param
);
...
...
Please
register
or
login
to post a comment