It is strictly dependent on the type of doctor you are referring to. In other words, medical doctor (MD) and specialty, or PhD, EdD, DDS, etc.
When you write to a holder of an academic doctorate, use Dr. William Green or William Green, Ph.D. When you have a Ph.D., sign your name either as Dr. Ernest Smith or Ernest Smith, Ph.D. If you have a Ph.D. you should engrave all your personal envelopes or labels with either Dr. Ernest Smith or Ernest Smith, Ph.D.