The recent string of events involving public figures sexting, texting or tweeting images of themselves or soliciting extra-marital sexual activity is a form of pornography. Pornography is seriously sinful. If its use is engaged in with sufficient reflection and full consent of the will it is mortally sinful, that is it removes the individual from a state of grace.
"Pornography consists in removing real or simulated sexual acts from the intimacy of the partners, in order to display them deliberately to third parties. It offends against chastity because it perverts the conjugal act, the intimate giving of spouses to each other. It does grave injury to the dignity of its participants (actors, vendors, the public), since each one becomes an object of base pleasure and illicit profit for others. It immerses all who are involved in the illusion of a fantasy world. It is a grave offense. Civil authorities should prevent the production and distribution of pornographic materials." (CCC 2354)
Chastity is the graced condition of the human person, living an integral and holy human life.
"People should cultivate [chastity] in the way that is suited to their state of life. Some profess virginity or consecrated celibacy which enables them to give themselves to God alone with an undivided heart in a remarkable manner. Others live in the way prescribed for all by the moral law, whether they are married or single." Married people are called to live conjugal chastity; others practice chastity in continence:
There are three forms of the virtue of chastity: the first is that of spouses, the second that of widows, and the third that of virgins. We do not praise any one of them to the exclusion of the others. . . . This is what makes for the richness of the discipline of the Church.” CCC 2349)
The use of the sexual faculty outside of marriage is seriously sinful.
"Among the sins gravely contrary to chastity are masturbation, fornication, pornography, and homosexual practices." (CCC 2396)
Sacramental confession to a priest is necessary for a Christian to return to communion with the Lord and His Church and to be able to receive the sacrament of the Eucharist in a state of grace, that is without sacrilege.
"Confession to a priest is an essential part of the sacrament of Penance: "All mortal sins of which penitents after a diligent self-examination are conscious must be recounted by them in confession, even if they are most secret and have been committed against the last two precepts of the Decalogue; for these sins sometimes wound the soul more grievously and are more dangerous than those which are committed openly.
"When Christ's faithful strive to confess all the sins that they can remember, they undoubtedly place all of them before the divine mercy for pardon. But those who fail to do so and knowingly withhold some, place nothing before the divine goodness for remission through the mediation of the priest, 'for if the sick person is too ashamed to show his wound to the doctor, the medicine cannot heal what it does not know.' " -- CCC 1456
"Anyone who desires to receive Christ in Eucharistic communion must be in the state of grace. Anyone aware of having sinned mortally must not receive communion without having received absolution in the sacrament of penance." (CCC 1415)