Yii2 is not senting emails

I have installed yii2 advanced template without any changes and deployed same on the server. But, when I create an account and reset password also it is not sending any mail to the user. I have checked several solutions on the internet but none of them are explaining the problem exactly. Some solutions are related to swiftmailer. But, I Don’t want to use that mailer. I want to use mail() on php how can I achieve this?

If you just want to use mail() what is stopping you now from doing this, because I don’t understand the problem here.

I have solved the issue the issue was the default mail was not senting it is got solved thank you for your help