Federal authorities indicted shipping giant FedEx late last week, alleging that the company knowingly helped online pharmacies ship illegal drugs to U.S. residents.

Prosecutors say that law enforcement officials gave FedEx lists of illegal pharmacies more than once. But in a written response to the charges, FedEx said it repeatedly asked for such information and never received it.

The company said it couldn’t realistically make sure that the contents of the 10 million packages it ships a day are legal.

“[T]he government is suggesting that FedEx assume criminal responsibility for the legality of the contents of the millions of packages that we pick up and deliver every day. We are a transportation company – we are not law enforcement. We have no interest in violating the privacy of our customers,” wrote Patrick Fitzgerald, the company’s senior vice president marketing and communications.

But the indictment also quotes internal company emails saying that FedEx set up a stricter billing policy specifically for online pharmacies to make sure that the company wouldn’t be left with unpaid bills if the pharmacies were shut down by law enforcement.

“Many of these companies operate outside federal and state regulations over the sale of controlled drugs, which require diagnosis and prescription by a licensed physician," the company’s managing director of sales wrote in a company email explaining the billing policy, according to the indictment. "Drugs purchased from these sites may be diluted or counterfeit. Several sites have been shut down by the government without warning or simply disappeared leaving large balances owing to FedEx.” 

FedEx has done at least $820 million in business with the pharmacies, according to the indictment. If found guilty, it could be fined as much as $1.6 billion.

After facing similar charges in 2013, UPS agreed to pay a $40 million fine and take steps to stop online pharmacies from shipping illegal drugs.

Read More: Why Americans Take So Many Prescription Drugs »

What Makes an Online Pharmacy Illegal?

Pharmacies can legally ship many prescription drugs. But they must have a physical location in the United States and require a valid prescription from a doctor who has consulted with the patient face-to-face.

Illegal online pharmacies don’t require prescriptions, making it possible for people to buy powerful drugs like Vicodin and oxycodone for recreational use. In some cases, they sell mislabeled drugs as well as drugs that have been banned in the U.S.

But because many operate from outside the U.S., it’s difficult for law enforcement to shut them down directly.

Illegal online pharmacies have flourished since the early days of the Internet and continue to do upwards of $13 million in business each year.

The online pharmacies appeal to customers with dramatically lower drug prices than those of licensed pharmacies. And their advertising accounts for the bulk of the spam email sent out every day, according to Stefan Savage, an expert in spam and computer crime at the University of California, San Diego.

Learn More About Prescription Drug Addiction »

Some customers use the pharmacies to acquire drugs for recreational use. But others seek medications they genuinely need but cannot afford due to lack of insurance coverage, according to Nektarios Leontiadis, a Carnegie Mellon University doctoral student in engineering and public policy who has researched Internet pharmacies.

Drugs to treat chronic conditions, such as cardiac and psychiatric disorders, are disproportionately stocked at illegal pharmacies, Leontiadis found in a 2013 survey of their inventories.  

Buyers may not know they’re breaking the law buying from the pharmacies.

“If you believe what you read on their websites you might believe you are not doing something illegal,” Leontiadis said.

Resources: FDA Guide to Buying Drugs Legally Online