Lawyers for internet search giant Google say their long-running practice of electronically scanning the contents of people's Gmail accounts to help sell advertising is legal, and have asked a US judge to dismiss a lawsuit seeking to stop the practice.
In court records filed in advance of a federal hearing scheduled for Thursday, Google argues that "all users of email must necessarily expect that their emails will be subject to automated processing".
The class action lawsuit filed in May claims Google "unlawfully opens up, reads, and acquires the content of people's private email messages" in violation of California's privacy laws and federal wiretapping statutes.
The lawsuit notes that the company even scans messages sent to any of the 425 million active Gmail users from non-Gmail users who never agreed to the company's terms.
Google has repeatedly described how it targets its advertising based on words that show up in Gmail messages.
For example, the company said if someone has received a lot of messages about photography or cameras, then it might display an advertisement from a local camera store. Google says the process is fully automated, "and no humans read your email".
Privacy advocates have long questioned the practice.
Consumer Watchdog president Jamie Court said: "People believe, for better or worse, that their email is private correspondence, not subject to the eyes of a 180 billion dollar (£115 billion) corporation and its whims."