Strange and heavy mesons in hadronic matter