Note that 'To whom it may concern' is very rarely used by native speakers.
Use it eg if you are a boss writing a general reference for one of your employees. But if you writing eg to the manager of XYZ Company and you don't know the person's name, just use