Supposed to be illegal but they got away with it.
Cruz was involved with all of the dirty doings of campaign from mailing out “voter violation” letters to announcing Carson had quit the campaign. He denied he had anything to do with that yet he apologized to Carson.
From the moment Cruz hired Jeff Roe to be his campaign manager, any informed person knew it would be dirty. That’s the only kind of campaign Roe knows how to run: win at any price. Roe’s dirty tricks work best at the state level, though. On the national level, with fifty states in play, voters catch on to Roe’s sleazy tactics before the campaign is over. Thankfully most voters eventually caught on to Cruz’ underhanded moves, and rejected him.