A few years ago, Dallas resident and mother Brandy Davis was reentering the online dating scene. After matching with a "seemingly nice" man, the two exchanged phone numbers. Then, one afternoon while Davis was at work, the man sent her an unrequested nude photo of himself.

"I remember thinking, 'If this is going to come unexpected like this, it could come at a time when my son has my phone,'" Davis testified during a May Senate hearing. "I was appalled ... because nobody should be subjected to that."

House Bill 2789, signed by Texas Gov. Greg Abbott in May, aims to put an end to experiences like Davis'. The law goes into effect Sept. 1 and makes the electronic transmission of sexually explicit material a Class C misdemeanor, with a maximum $500 fine, when the recipient hasn't provided consent. The law will make Texas one of the first states to take a stand against sending sexually explicit images, which about 40% of women report receiving without consent.

The law won't apply just to texts, but also to what's sent over other platforms like email, dating apps and social media.

The Texas Tribune thanks its sponsors. Become one .

Rep. Morgan Meyer, R-Dallas, who authored the legislation, said as a father of three, he wanted to prevent a form of sexual harassment that previously went unchecked. The bill, he said, aims to close a gap in state law — indecent exposure is a crime in person, but not online.

"Quite frankly, the thought of someone doing that to one of my children scared me," Meyer said. "There had to be some sort of deterrent to stop this from happening — and now there is."

Meyer said representatives from Bumble, the mobile dating app headquartered in Austin, initially brought the idea of crafting legislation to him. During a May 13 Senate committee hearing, Bumble CEO Whitney Wolfe Herd testified in support of the legislation.

"Lately, it feels like men and women are being told that this increasingly common problem is really no big deal. Women in particular are expected to laugh this sort of thing off," Herd testified. "But there’s nothing funny about it."

But with a "staggering volume" of people affected, Dallas employment law attorney Michelle MacLeod, whose firm represents clients in sexual harassment cases, said enforcement could be challenging with limited resources.

J.T. Morris, an Austin-based attorney whose firm specializes in First Amendment rights, said difficulties may also arise if an accused sender claims he or she wasn't the one who sent a lewd message.

That situation played out in the Texas Senate last year when state Sen. Charles Schwertner was accused of texting sexually explicit messages to a University of Texas at Austin graduate student. Schwertner denied the allegations, saying he hadn't sent the texts, and a UT investigation found it was “plausible” a third party had sent them.

Morris said even emailing a doctor an image for medical purposes or posting a photo taken while breastfeeding could be considered criminal acts under the law, which he said is overly broad and vague.

The Texas Tribune thanks its sponsors. Become one .

That's why David Anderson, a former UT Austin law professor who focuses on free speech, expects legal challenges to the law.

Four years ago, the Texas Legislature passed a similar law criminalizing revenge porn. The law was declared unconstitutional in April 2018 after a state appeals court said its broad restrictions infringed on free speech. It's awaiting a final decision in the Texas Court of Criminal Appeals, and Anderson believes a similar constitutional challenge could mark the end for HB 2749.

"I don't think it could survive," Anderson said, "and even if it could, it probably won't ever get to that stage. Who are they going to prosecute?"

Still, Meyer said the law isn't aimed solely at punishing offenders.

The Texas Tribune thanks its sponsors. Become one .

"We understand that enforcement will be a challenge," Meyer said, "but this bill is intended to serve as a deterrent as well. It's keeping people aware that sending unsolicited lewd photos will not be tolerated ... and stopping them from doing it in the first place."

Disclosure: Bumble and the University of Texas at Austin have been financial supporters of The Texas Tribune, a nonprofit, nonpartisan news organization that is funded in part by donations from members, foundations and corporate sponsors. Financial supporters play no role in the Tribune's journalism. Find a complete list of them here.