Hello,
The following article will help you with managing the mail on Mac: https://support.apple.com/en-us/HT204093
Please note that the issue you are having is related to the account password issue.
You can reset the mail password using the mail service provider. Example: Outlook, live, hotmail -> you can go to hotmail.com and enter the user name and tap on reset the password. If you are using the email provided by your Internet Service provider, then go to the webmail (ex: bigpond webmail, Optus webmail) to reset the password or contact the ISP to reset the password.
As it is an account related issue, both the Mac's are having the mail issue (same account on 2 devices).