Cannot instantiate abstract class Cake\Mailer\Mailer

You will in general get much better help if you include only relevant details. Not too much, but not too little. For example, here the “index” and “add” and “view” and “edit” and “delete” functions are probably unrelated to what you’re trying to do. Why include them?

Your code is also not all formatted well, for some reason, which makes it hard to read, and therefore harder to help.

Lastly, you say you want to “build forgot password page”, but you don’t say what your specific problem is. You have “forgotpassword” and “resetpassword” functions here. Do they not work? If not, what, specifically, fails? Or do you need help making a template? You haven’t shown what the templates for these pages look like, so we don’t know whether you just don’t have them at all, or if there’s some problem with how you’ve set up those forms, for example.

And really truly lastly, calling people out by name is, I think, a little rude. Help here is given voluntarily by people donating their time to help others. By naming people you are implicitly making a demand on them, which is not a good way to encourage the volunteer behaviour.