Log out of or remove email accounts in Mail on Mac
You can remove an email account from the Mail app on your Mac at any time. When you do, the account’s email messages are removed from your Mac. Copies of messages remain on the account’s mail server and are still available (from webmail, for example).
Important: If you’re unsure whether messages you want to keep are still on the mail server, move or copy them to a mailbox stored on your Mac (the mailbox appears in the On My Mac section in the Mail sidebar) before you remove the account in Mail.
In the Mail app on your Mac, choose Mail > Settings, then click Accounts.
Select an account, then click the Remove button .
Note: If the account is used by other apps on your Mac, you’re asked to remove the account in Internet Accounts settings. Click the button to open Internet Accounts, then turn Mail off for the account. To stop using the account in all apps, make sure the account is selected, then click the Remove button .