It is narrated from the Prophet of Islam (PBUH) who said:
O’ the young ones, any one of you who is able to marry, do so; and whoever is unable, turn to fasting, because fasting controls him/her [1]. In another narration, it is narrated that Prophet Isa/Jesus (AS) told his companions: Moses (AS) commanded you to avoid adultery, and I command you not even think about adultery, because the one who thinks about adultery is like the person who starts fire and smoke in a house which has been painted and decorated. Although this act may not burn the house but it darkens and tarnishes the decoration [2].
[1] Beharul Anwaar, Vol. 100, Page 220.
[2] Wasa’elul Shia, Vol. 14, page 240.
Source: en.shafaqna.com