Yahoo has reached an agreement with two sets of users that launched a lawsuit against the company, resulting in cases being dropped which claim Yahoo scans emails in order to illegally target advertising.

According to Bloomberg, two groups of users that launched separate lawsuits against the tech giant have met with representatives of the firm, and have agreed to drop their complaints. However, similar cases which also suggest that Yahoo has illegally scanned the content of emails in order to target and personalize advertisements are going ahead.

By scanning the content of emails and picking out keywords, email providers -- such as Yahoo and Google -- could make the advertizing experience more personal for users. Making ads more relevant can improve revenue streams produced by marketers and advertizers, but critics say that reading such communication is an invasion of privacy.

One of the cases, a class-action lawsuit, was filed in federal court in San Jose, California. The suit, launched on behalf of 100 million users and seeking $5 million in damages, claimed that keyword scanning invades user privacy and breaks both state and federal wiretap laws.

Two cases have now been dropped. A lawyer involved in one of the cases, David Straite, said:

"Two of the six cases have been discontinued but the other four are continuing. The court is still considering a motion to consolidate the remaining four cases and appoint leadership."

After meeting with Yahoo representatives, lawyers involved in one of the suits said the complaint was not an area "they would like to pursue" due to the firm's "representations."

A similar case was launched against Yahoo in 2012. Court records show that the complaint alleged the tech giant used "devices and techniques" to examine the words and content contained within emails sent by non-Yahoo users before forwarding them on to account holders.