Which letter opening is more formal?

 - Dear Mr. Khan,
 - Dear Tommy,
The second letter opening is more formal. It uses the recipient's personal title and last name. The other opening uses the recipient's first name, suggesting a more familiar relationship.