Sabra reported,

He was with the Messenger of Allah ﷺ when he said, "People, I had previously permitted you to engage in temporary marriage with women. Allah has now forbidden that until the Day of Resurrection. Whoever has any of these women with him should let her go, and do not take back anything you have given them."In another wording, "I saw the Messenger of Allah ﷺ standing between the Corner and the Door, saying," and he then mentioned the same.

Azami 6471

Sahih

عن سبرة الجهني

أنه كان مع رسول الله ﷺ فقال: يا أيها الناس، إني قد كنت أذنت لكم في الاستمتاع من النساء. وإن الله قد حرم ذلك إلى يوم القيامة، فمن كان عنده منهن شيء فليخل سبيله، ولا تأخذوا مما آتيتموهن شيئا. وفي لفظ: رأيت رسول الله ﷺ قائما بين الركن والباب، وهو يقول: فذكره.

الأعظمي 6471صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Marriage
Chapter
Prohibited marriages in Islam
Section
Mutah marriage and the explanation of its abrogation
Numbering
Jami al-Kamil 6471 (2nd edition)
Azami 6471