The default Mail app in OS X helps you manage your email. You can plug in any of your email accounts to the Mail app (iCloud, Gmail, Microsoft Exchange, Yahoo etc.). If, for some reason, you want to delete an email account from your Mac OS X, it's easier than adding one.
Here's how to delete your email account on your Mac OS X. Note that you will lose all email cache from your machine (but it's safe on the email server so you don't have to worry about data loss.)
Removing Email Account from Mac OS X Mail:
Step #1. Open the Mail app.
Step #2. Click on Mail from the top menu.
Step #3. Now, click on Preferences.
Step #4. On the sidebar/left-pane click on the email account you want to remove.
Step #5. Now, click on the “-” from the bottom.
Step #6. Confirm the deletion by clicking on OK.
Step #1. Open System Preferences (Apple menu → Preferences or click the System Preferences icon on the dock)
Step #2. Click on Internet Accounts.
Step #3. Select the email account you want to delete.
Step #4. Press the “-” button at the bottom.
Step #5. Confirm the deletion by clicking OK.
People usually clear out their email accounts for a couple of reasons: either the cache gets too big or their email accounts stop working on the Mac.
Deleting an email account only removes email cache. Attachments that you downloaded/saved to your local disk will be retained even if you delete the associated account. But if you have associated the email account to other apps like the Calendar or Reminders, you should note that you'll lose information.
You can re-add the same email account through System Preferences → Internet Accounts (or just by opening the Mail app, and then Mail → Accounts). This method is useful when all you want to do is clear all email cache associated with an account.
Note: If you have more than one mail accounts using the Gmail server, you might get an error message “Duplicate Account: This account already exists” when you try to re-add your Google account. The best way to fix it is to update your Mac to the latest software.