小编Mic*_*ael的帖子

Laravel 5 密码重置电子邮件未发送

我正在尝试在我的 Laravel 5.1 应用程序上实现密码重置。我已经按照文档(http://laravel.com/docs/5.1/authentication#resetting-passwords)来完成这项工作。但是,每当我单击我的“重置密码”按钮时,/password/email/都不会发送电子邮件。

我故意输入了不正确的电子邮件,但收到了相应的错误,但是当我输入正确的电子邮件时,没有发送电子邮件,也没有收到任何类型的消息或任何电子邮件。

我查看了我的数据库,它看起来好像正在创建密码重置令牌,只是没有发送电子邮件。

我的电子邮件配置工作正常,因为我的应用程序的其他部分可以正常发送电子邮件,只有这一部分没有发送电子邮件。任何帮助将不胜感激,因为我不知道还有什么要检查的。

迈克尔

路线.php:`

// Password reset link request routes...
Route::get('password/email', ['as' => 'password/email', 'uses' => 'Auth\PasswordController@getEmail']);
Route::post('password/email', 'Auth\PasswordController@postEmail');

    // Password reset routes...
    Route::get('password/reset/{token}', 'Auth\PasswordController@getReset');
    Route::post('password/reset', 'Auth\PasswordController@postReset');
Run Code Online (Sandbox Code Playgroud)

密码.blade.php:

<form id="contact-form" class="contact-section" method="POST" action="/password/email">
            <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>">
            <span class="pre-input"><i class="fa fa-envelope-o"></i></span>
            <input class="name plain buffer" type="email" name="email" placeholder="Email" value="{{ old('email') }}">
            <input id="send" class="plain button yellow" type="submit" value="Reset Password">
              @foreach($errors->all() as $error)
              <font size="3" color="red">{{ $error }}</font>
              @endforeach …
Run Code Online (Sandbox Code Playgroud)

php email authentication laravel-5

3
推荐指数
1
解决办法
2万
查看次数

标签 统计

authentication ×1

email ×1

laravel-5 ×1

php ×1