Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
L
laravelzh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
冯超鹏
laravelzh
Commits
3b0640c8
Commit
3b0640c8
authored
Oct 09, 2020
by
冯超鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
邮箱
parent
f4872309
Pipeline
#147
canceled with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
16 deletions
+30
-16
UinappHomeController.php
app/Http/Controllers/UinappHomeController.php
+12
-0
mail.php
config/mail.php
+17
-16
api.php
routes/api.php
+1
-0
No files found.
app/Http/Controllers/UinappHomeController.php
View file @
3b0640c8
...
...
@@ -16,6 +16,7 @@ use Illuminate\Support\Facades\Auth;
use
Illuminate\Support\Facades\DB
;
use
Illuminate\Support\Facades\Hash
;
use
Illuminate\Support\Facades\Redis
;
use
Mail
;
use
Validator
;
class
UinappHomeController
extends
Controller
...
...
@@ -131,6 +132,17 @@ class UinappHomeController extends Controller
}
}
// 发送邮箱验证
public
function
mails
(
Request
$request
){
$isemail
=
$request
->
input
(
'email'
);
Mail
::
raw
(
'你好,我是PHP程序!'
,
function
(
$message
)
{
$to
=
'1431670879@qq.com'
;
$message
->
to
(
$to
)
->
subject
(
'纯文本信息邮件测试'
);
});
// vwhmtzucgpcjbfha
// sahaqcyksulsbaie
}
//监测是否是汉子
private
function
isKanji
(
$str
)
{
...
...
config/mail.php
View file @
3b0640c8
...
...
@@ -16,7 +16,7 @@ return [
|
*/
'driver'
=>
env
(
'MAIL_DRIVER'
,
'smtp'
),
'driver'
=>
env
(
'MAIL_DRIVER'
,
'smtp'
),
/*
|--------------------------------------------------------------------------
...
...
@@ -29,7 +29,7 @@ return [
|
*/
'host'
=>
env
(
'MAIL_HOST'
,
'smtp.mailgun.org
'
),
'host'
=>
env
(
'MAIL_HOST'
,
'smtp.163.com
'
),
/*
|--------------------------------------------------------------------------
...
...
@@ -42,7 +42,7 @@ return [
|
*/
'port'
=>
env
(
'MAIL_PORT'
,
587
),
'port'
=>
env
(
'MAIL_PORT'
),
/*
|--------------------------------------------------------------------------
...
...
@@ -56,8 +56,8 @@ return [
*/
'from'
=>
[
'address'
=>
env
(
'MAIL_FROM_ADDRESS'
,
'hello@example
.com'
),
'name'
=>
env
(
'MAIL_FROM_NAME'
,
'Example
'
),
'address'
=>
env
(
'MAIL_FROM_ADDRESS'
,
'16631150870@163
.com'
),
'name'
=>
env
(
'MAIL_FROM_NAME'
,
'邮件发送
'
),
],
/*
...
...
@@ -71,7 +71,7 @@ return [
|
*/
'encryption'
=>
env
(
'MAIL_ENCRYPTION'
,
'tls
'
),
'encryption'
=>
env
(
'MAIL_ENCRYPTION'
,
'SMTP
'
),
/*
|--------------------------------------------------------------------------
...
...
@@ -84,9 +84,9 @@ return [
|
*/
'username'
=>
env
(
'MAIL_USERNAME'
),
'username'
=>
env
(
'MAIL_USERNAME'
,
'16631150870@163.com'
),
'password'
=>
env
(
'MAIL_PASSWORD'
),
'password'
=>
env
(
'MAIL_PASSWORD'
,
'KXFOEZZRXPFNMKHK'
),
/*
|--------------------------------------------------------------------------
...
...
@@ -112,13 +112,14 @@ return [
|
*/
'markdown'
=>
[
'theme'
=>
'default'
,
'paths'
=>
[
resource_path
(
'views/vendor/mail'
),
],
],
'pretend'
=>
false
,
// 'markdown' => [
// 'theme' => 'default',
//
// 'paths' => [
// resource_path('views/vendor/mail'),
// ],
// ],
/*
|--------------------------------------------------------------------------
...
...
@@ -131,6 +132,6 @@ return [
|
*/
'log_channel'
=>
env
(
'MAIL_LOG_CHANNEL'
),
//
'log_channel' => env('MAIL_LOG_CHANNEL'),
];
routes/api.php
View file @
3b0640c8
...
...
@@ -19,6 +19,7 @@ Route::post('auth/login', 'AuthController@login');
Route
::
post
(
'auth/userslogin'
,
'AuthController@userslogin'
);
//用户登入接口
Route
::
post
(
'huinapphome/isemail'
,
'UinappHomeController@isemail'
);
//邮箱验证
Route
::
post
(
'huinapphome/ispassword'
,
'UinappHomeController@ispassword'
);
//密码更改
Route
::
post
(
'huinapphome/mails'
,
'UinappHomeController@mails'
);
//邮箱验证码发送
Route
::
group
([
'middleware'
=>
'auth:api'
],
function
()
{
Route
::
get
(
'auth/user'
,
'AuthController@user'
);
Route
::
post
(
'auth/logout'
,
'AuthController@logout'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment