Why else would they give you their password? They must know that you will look!
I don't think there is any law against it, if there was they will have invalidated it by giving their password out. A bit like giving someone your bank card and PIN, you are then liable if someone steals all your money 'cos you told them your PIN!!!
It depends on the sutation to certain extent. There are Data Protection and Computer Misuse offences that may apply depending on the email account. A personal hotamill account would be different from a government work email account.