When is it appropriate to use the terms Dear Sir or Madam and To whom it may concern? The rules I was taught state that Dear Sir or Madam should be used when you're writing a letter to a person about something that person has direct involvement in (e.g. returning a defective product to a customer service department). By the same rules, To whom it may concern would be used for situations in which the recipient is a third party to the topic of the letter (e.g. regarding a letter of reference or recommendation).
Was I taught correctly? Is the rule actually something else? Or is this one of those situations where many people have an opinion but there is no real rule?
Both forms of addressing are used when you don't know their name. Otherwise it's a poor excuse for not being able to make use of technology properly when you do know their name. In which case it would be Dear X Y and Y Z, where the letters are meant to represent full name. It also does away with using titles, as titles are used rarely nowadays, unless it's a personal invitation in a professional circle. "To whom it may concern" are unaddressed offers in the mailbox that end up promptly in the rubbish bin.