"There are some who say that intercourse between married persons is not devoid of sin. But this is heretical, for the Apostle says: 'Let marriage be honorable in all and the bed undefiled' [Hb 13:4]. Not only is it devoid of sin, but for those in the state of grace it is meritorious for eternal life.
Sometimes, however, it may be a venial sin, sometimes a mortal sin. When it is had with the intention of bringing forth offspring, it is an act of virtue. When it is had with the intent of rendering mutual comfort, it is an act of justice. When it is a cause of exciting lust, although within the limits of marriage, it is a venial sin; and when it goes beyond these limits, so as to intend intercourse with another if possible, it would be a mortal sin."
(From his Explanation of the Ten Commandments)