Imam ibn Taymiyah رحمہ اللہ said:
وإذا أحب امرأة في الدنيا ولم يتزوجها وتصدق بمهرها وطلبها من الله تعالى أن تكون له زوجة في الآخرة رجي له ذلك من الله تعالى.
If a man loves a woman and it is not possible for him to marry her in this dunya and he pays the Mahr (dowry) as a charity, make dua to Allah azzawajal to make that woman his wife in the akhirah then it can be assumed that Allah will grant his dua.
[Fatawa al Kubra 5/461]