Mössbauer-effect probability for heterogeneous matters