Unsolicited text spam will cost iHeartMedia Inc. $8.5 million in a deal to settle a Telephone Consumer Protection Act class action against the company filed in an Illinois state court.

Listeners to the company’s radio stations were encouraged to text song requests or send a message to the station to enter a contest, according to the complaint. But the plaintiffs alleged iHeartMedia responded to such texts with advertising messages, such as “Hot 99.5: Get Xclusive Txt Alerts 4 your cellphone, reply HOT. Hot995.com 4 more. PWD BY Circle K Convenience Stores circlekmacs.com” and “KDWB & Sky Zone Indoor Trampoline Park thx U R ur txt! Reply ‘MORE’ if you would like 2 receive info from Sky Zone on bday party packages!”

After a full-day mediation—where the parties discussed the potential implication of the U.S. Supreme Court’s ruling inSpokeo, Inc. v. Robins—iHeartMedia and the plaintiffs reached a deal.

The defendant denied all allegations of wrongdoing and liability, but agreed to establish a settlement fund in the amount of $8.5 million. All settlement administration expenses, all approved claims made by class members, any incentive awards to class representatives, and class counsel fee award will be paid from the fund. In return, class members will release iHeartMedia from all TCPA-related claims.

Class members—those who received text messages from the defendant between October 16, 2013 and April 19, 2016 and did not provide consent—will receive a pro rata share of the amount remaining in the fund after payment of the settlement administration expenses, the requested $5,000 incentive award for the two named class representatives, and the class counsel fee award, not to exceed $3.4 million.

In addition, the defendant represented that it changed the process of sending advertising text messages as of July 2, 2015, “such that legal department approval is required for each message,” according to the settlement agreement. “iHeartMedia has also agreed that, to the extent it performs such text message advertising in the future, it shall maintain procedures to obtain message recipients’ prior express consent to receive such messages on their cellular telephones.”

To read the settlement agreement in Willis v. iHeartMedia, click here.

Why it matters: An Illinois state court judge granted preliminary approval to the multimillion-dollar deal, with a final hearing set for August 11. iHeartMedia’s alleged failure to obtain appropriate consent for its marketing text messages proved costly for the company and serves as a reminder about the importance of complying with the TCPA.