this is from my experience a while back, but still probably acceptable
email from a civilian to military can be formatted any way you want, but active military to military has certain etiquette to follow.
when speaking, you address a chief petty officer as Chief, as in "Hello, Chief Neptune, nice day today", and you'd address a LTJG or LCDR as "lieutenant" or "commander"
but in writing, you'd address him/her as CPO Neptune/LTJG Badass/LCDR Hinge
For informal email, you'd avoid greetings like "Hi" or "Hello" and "Dear", and use "Good morning/afternoon/evening"
for example:
Good morning, CPO Neptune,
<body of message>
Very Respectfully, (or V/R)
AB2 Hotshot
For closing, this is what you usually see,
R/ = Junior
V/R = senior or civilian
Very Respectfully = 06 and above