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."
There is a tendency to think that the often arbitrary rules of letter writing don’t really matter, that as long as your recipient can work out what you’re saying, that’s good enough. This shows a great deal of disrespect for your recipient, though, and for your own ideas. It suggests that a) your reader’s time isn’t valuable enough for you to write clearly and efficiently, and b) that you don’t particularly care about the content of your letter.