I would like to address a person with a medical Dr. title formally in mail. In English it is simple, just adding the title: "Dear Dr. X." In German, on the other hand, it is a bit more complex: I also need to add a proper gender prefix (Herr or Frau): "Sehr geehrter Herr Dr X" or "Sehr geehrte Frau Dr X".
How is it done in Spanish?