From Pope St. John Paul II’s encyclical Veritatis Splendor (1993):
A doctrine which dissociates the moral act from the bodily dimensions of its exercise is contrary to the teaching of Scripture and Tradition. Such a doctrine revives, in new forms, certain ancient errors which have always been opposed by the Church, inasmuch as they reduce the human person to a “spiritual” and purely formal freedom. This reduction misunderstands the moral meaning of the body and of kinds of behaviour involving it (cf. 1 Cor 6:19). Saint Paul declares that “the immoral, idolaters, adulterers, sexual perverts, thieves, the greedy, drunkards, revilers, robbers” are excluded from the Kingdom of God (cf. 1 Cor 6:9). This condemnation — repeated by the Council of Trent88 — lists as “mortal sins” or “immoral practices” certain specific kinds of behaviour the wilful acceptance of which prevents believers from sharing in the inheritance promised to them. In fact, body and soul are inseparable: in the person, in the willing agent and in the deliberate act, they stand or fall together.
88 Cf. Sess. VI, Decree on Justification Cum Hoc Tempore, Chap. 15: H. Denzinger-A Schönmetzer, Enchiridion Symbolorum Definitionum et Declarationum de Rebus Fidei et Morum, 1544. The Post-Synodal Apostolic Exhortation on Reconciliation and Penance in the Mission of the Church Today cites other texts of the Old and New Testaments which condemn as mortal sins certain modes of conduct involving the body: cf. Reconciliatio et Paenitentia (December 2, 1984), 17: Acta Apostolicae Sedis 77 (1985), 218-223.
— Veritatis Splendor 49