Note that an invitation letter is not technically required, but it can almost certainly help. From the US Embassy website:
An invitation is not required and cannot guarantee visa issuance. In
fact, there are no required documents for tourist/business visa
It's more about documenting your reasons for visit, and evidence that you'll leave in a timely manner, etc.
For tourist/business visas, the most commonly applied for visa class,
applicants must be able to demonstrate to the satisfaction of the
consular officer that their travel plans fall within the parameters of
the requested visa class – limited travel for pleasure or business
(but not employment) of short durations. Applicants must also be able
to demonstrate that they will depart the United States in a timely
manner to return to their residence abroad.
As a result, email or letter won't matter, it's not 'official' it's just additional useful documentation. It should contain useful information that can be checked. From Sampleinvitationletter.info:
the following should be in the letter of invitation.
Your letter should include the following information about the person
Date of birth.
The person’s address and telephone number.
Your relationship to the person being invited.
The purpose of the trip.
How long the person you are inviting intends to stay in the United States of America.
Details on accommodation and living expenses.
The date the person you are inviting intends to leave the USA.
Your letter should also include the following information about the
person writing the letter:
Date of birth.
Address and telephone number in the United States.
Your status in the United States
A photocopy of a document proving your status in the United States.