Sometimes there are mail accounts OS X's mail app that won't delete. This is usually you have multiple accounts with the same provider. In reality its simply that there is a lock on them. There is a simple fix.

  1. Go to system preferences
  2. Open iCloud
  3. Untick iCloud keychain
  4. Go back and retry
  5. Finally reverse these steps to turn it back on