Part 30 - Password Reset Emails [How to Build a Blog with Laravel 5 Series]


Author: DevMarketer
13548 View
55m 12s Lenght
204 Rating


Today's packed video will help us set up our password reset (Forgot my Password) functionality that is built into Laravel, and it will also get our toes wet showing us how to set up basic email sending using Laravel. The first part that we need to do is set up our views and our routes for the forgot my password functionality. Remember that the controller actions are already written, so we just need to write the routes to support this and the views needed for this functionality. Next we will set our app up to allow for sending emails. There are many services that you can use to do this, but you MUST use a service. Laravel will not send email from the basic mail() function built into PHP. This is unsecure and sends emails that go into spam folders anyway. For any modern app you will need to use a service like Amazon SES, Mandrill, Mailgun, or SendGrid. In this video I will briefly show you set up to send via gmail which is only recommended for testing servers to live email accounts. However, the preferred method that I suggest is to use mailtrap.io which is a testing email service and is COMPLETELY FREE. --- DOWNLOAD SOURCE CODE --- Note: remember that the .env file is not sent to github, so you will still need to update your .env file for your mail server after downloading the code. https://github.com/jacurtis/laravel-blog-tutorial/releases/tag/part_30 --- LINKS --- How To Allow "Less Secure Apps" to send from your Gmail: https://support.google.com/accounts/answer/6010255?hl=en MailTrap.io - Free Testing Email Server https://mailtrap.io -- I have to go, but will finish the description and links when I get back tonight. I wanted to allow you to all see the video as soon as possible. Have a great day, - Jacurtis


Comments

  1. Hello While entering email for reset password I get the error

    ErrorException in StreamBuffer.php line 94:
    stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
    error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

    I don't know if theres anything wrong with my .env file
    I have the same things filled with my username and password from mail trap and port 25
  2. Hi how do I setup for recipient to receive the mails directly after my test with mailtrap
  3. For Laravel 5.4 there isn't a route called password.reset and the fix for this thing is the follow:

    Route::post('password/reset', ['uses' => 'Auth\ResetPasswordController@reset', 'as' => 'password.reset']);
  4. Thank you very much
  5. I can't change laravel formatting email in Laravel 5.3.. It's default.. so that makes email that should be returned in the input value is empty. Hopefully you can give tutorial how to change it for the next tutorial in laravel 5.3.
  6. I am using laravel 5.3 to follow along this tutorial series. When I click this link :http://localhost/Blog/public/password/reset/a051fde545ec808f785666b290ab5e4ea6a3ac6f5d1c825bd6e4b62cac9ba87f on my mailtrap I get redirected to the passwords/reset page with the
    reset password form instead of the page that requires me to enter a new
    password. Anyone with suggestions on how I can fix this?
  7. Hello While entering email for reset password I get the error

    ErrorException in StreamBuffer.php line 95:
    stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
    error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

    I don't know if theres anything wrong with my .env file
    I have the same things filled with my username and password from mail trap and port 25
  8. Any1 knows how to fix?

    BadMethodCallException
    Call to undefined method Illuminate\Database\Query\Builder::notify()
  9. And how to to add a admin to manage every thing
  10. how to make user view and manage their own posts in case of multi user?
  11. Why we need this password.blade.php file under emails folder? Everything works fine without it
  12. hei alex when i go localhost:8000/password/reset it show
    FatalErrorException in 076488255f0647116f890062a52f9580a197e8e6.php line 11:
    syntax error, unexpected '=', expecting ']'
    can u explain?
  13. I'm using Laravel 5.3, and everything works fine but the thing is that when I write the new password after I've received that reset link, the password won't update in the database. I can still login with the old password..
  14. Hey I am using laravel 5.3 and for {{ Form::hidden('token', $token) }} I am getting "Errors :
    The token field is required. " flash message. Can you help me out on why is it happening?
  15. I'm using Laravel 5.3 anyone knows where the html is when sending the email link, so that i can modify it. it seems to be different than 5.2
  16. Please I got this error when I clicked the Send Reset Password Link button in laravel 5.3.15

    ErrorException in StreamBuffer.php line 95:
    stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
    error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
  17. Everything is working fine and thank you for the tutorial but one little problem.......i have a error saying token field is required when i want to reset the password
  18. when i click on reset Password i get the message: Relationship method must return an object of type Illuminate\Database\Eloquent\Relations\Relation (View:
    C:\...\resources\views\auth\emails\password.blade.php)
    ... how can i fix that?
  19. well done. learns a lot! thanks!