If you are writing to someone who has a doctorate or medical degree, use the abbreviated form: "Dr." However, for other titles, such as professor, judge, rabbi, etc., write out the full title and capitalize it. For example, your salutation in a letter to a judge would be, "Dear Judge Barnard." Or, if your correspondence was with a rabbi, you might write, "Dear Rabbi Williams."
The second version is clearer and thus preferable. Of course, there are exceptions to every rule. What if you are the head of the Global Finance Team? You may want to get your message across without calling excessive attention to the fact that the error was your team’s fault. The passive voice allows you to gloss over an unflattering point—but you should use it sparingly.