Section 28. Whoever purposefully disseminates to a person he knows or believes to be a minor any matter harmful to minors, as defined in section 31, knowing it to be harmful to minors, or has in his possession any such matter with the intent to disseminate the same to a person he knows or believes to be a minor, shall be punished by imprisonment in the state prison for not more than 5 years or in a jail or house of correction for not more than 2 1/2 years, or by a fine of not less than $1000 nor more than $10,000 for the first offense, not less than $5000 nor more than $20,000 for the second offense, or not less than $10,000 nor more than $30,000 for a third or subsequent offenses, or by both such fine and imprisonment. A person who disseminates an electronic communication or possesses an electronic communication with the intent to disseminate it shall not be found to have violated this section unless he specifically intends to direct the communication to a person he knows or believes to be a minor. A prosecution commenced under this section shall not be continued without a finding or placed on file. It shall be a defense in a prosecution under this section that the defendant was in a parental or guardianship relationship with the minor. It shall also be a defense in a prosecution under this section if the evidence proves that the defendant was a bona fide school, museum or library, or was acting in the course of his employment as an employee of such organization or of a retail outlet affiliated with and serving the educational purpose of such organization.This law has been a work in progress. In 2010, in Commonwealth v. Zubiel, 456 Mass. 27, the court held that "'[M]atter,' as defined in [the previous version of] G. L. c. 272, § 31, does not encompass electronically transmitted text, or "online conversations," for the purposes of a prosecution for attempted dissemination of matter harmful to a minor under G. L. c. 272, § 28."
In response, a new law was enacted, St.2010, c.74, s.2-3, which expanded the prohibition on the dissemination of obscenity effective July 11, 2010. It included, in part, "electronic mail, instant messages, text messages, and any other communication created by means of use of the Internet or wireless network."
In October, 2010, a federal court issued a preliminary injunction barring enforcement of MGL c.272, s.28 and s.31 in American Booksellers Foundation for Free Expression v. Coakley, holding that the law was overly broad and violated the First Amendment.
This new law, then, was enacted in response to those concerns. More information is available at Mass. Law About Obscenity.