I don't know about other email systems but in Gmail, it is easy to go into settings and change the name of the sender. So, if I want my emails to show "loveableoldfellow" or "xxxx", it is easy to change the settings to show that. On my Windows computer, the name of the sender shows in a list. I use an iconic picture and if you recognize that picture, you might know the email is from me. On both a smartphone and a computer, it is easy and quick to check the email address from which an email was sent.
However, if I change my settings so that "IRS" appears to be the name of the sender instead of my real name, you may take threatening or angry language to be authentically from the US tax guys. You could check to see what email address was used to launch the message but you might well be so scared or stirred up that you don't look to see that the message is a fake.
The Gmail settings may have analogous parts in other email software but I don't know about them. I assume the opportunity to change what name appears is offered to those who want their recipients to see "Cutie" or "Champ" instead of the actual first and last name. However, it is wise to be alert to the possibility that the name may be misleading. A relative received a fake message from "me" but was suspicious about it. She forwarded the message to me and asked if I had sent it. I had not.
So, if you get an email from your lawyer saying that you have inherited a million dollars, check the authenticity completely before you start spending.