Note: The DearEsq free 'ask a lawyer' site is offered as a free informational service to the public and is not intended as legal advice. Laws vary from state-to-state, and in addition every situation is unique, and relevant facts may not be known. The answer to the question posed below may not apply to in your state or to your situation. For legal advice in your state and your situation you should consult with an attorney in your state who is familiar with the rules and laws in your state.
‘I worked for an non-profit organization as a volunteer. I never signed any agreement with them. I set up their web page and email accounts for them. I set up the id & passwords. I left the organization 3 years ago. They have continued to use the same email and passwords since I set them up. I recently learned that they have been bad-mouthing me and just on a whim, went and tried to access the email account. To my surprise, the password was still the same as when I set it up. I went in and read some email that was very nasty regarding a friend of mine. I have that email. I want to confront them with it but my friend said that I could be prosecuted for going into that email, even though I did not get the password or account illegally, as I had set it up myself and they had never chosen to change the password in three years. Can I get in trouble for accessing this account and using anything in it since I did not hack into it but, rather, created the password & log-in id in the first place?’Would you get in trouble if you went back to their offices and used the key you’d had from when you worked there to let yourself into the office and go through their files
Question: This is no different. What you did was, at a minimum, trespassing, and yes, you broke the law.