The basic structure of a formal letter: The rules might be arbitrary, but taken together they create a formula that produces clarity. When a letter follows all the rules, the reader doesn’t have to struggle to figure out where a piece of information might be, what action they should take next, or who sent it _ everything can be found in its place. Knowing the rules of letter writing is, in that sense, akin to knowing the rules of page layout or web design _ the format of the document should support and clarify the content.
Sometimes a person's gender is unclear from a name _ names like "Corey" or "Blake," are both common women's and men's names. If that is the case, do some investigating to determine gender from searching on LinkedIn or a company website. But if it remains ambiguous, simply write out the person's full name, dropping the title. For example, "Dear Corey Meyer."