Health insurer Aetna will pay $17 million to settle claims that it exposed sensitive health information about thousands of customers who were taking medications to treat or prevent HIV.

Aetna sent a mailing to more than 13,000 customers in at least 23 states last year, and information about customers' medication could be seen through the clear display windows on the envelopes.

The case resulted a federal class-action lawsuit filed by AIDS Law Project of Pennsylvania, the Legal Action Center, and Berger & Montague in August. In response, Aetna agreed to pay at least $500 to customers whose privacy was breached and $75 to 1,600 customers whose names were improperly disclosed to a vendor.

The mailer caused some customers who received it to move or harmed their relationships, said Ronda Goldfein, executive director AIDS Law Project of Pennsylvania.

“The fear of losing control of HIV-related information and the resulting risk of discrimination are barriers to healthcare. This settlement reinforces the importance of keeping such information private, and we hope it reassures people living with HIV, or those on PrEP, that they do not have to choose between privacy and healthcare," she said, referring to pre-exposure prophylaxis, or PrEP, a medication that helps prevent the spread of HIV.

The lead plaintiff in the case, Andrew Beckett, said in a statement that he was pleased with the outcome.

“HIV still has a negative stigma associated with it, and I am pleased that this encouraging agreement with Aetna shows that HIV-related information warrants special care,” he said.

Aetna said it had worked to address the issue and to prevent similar occurrences.

"Through our outreach efforts, immediate relief program and this settlement we have worked to address the potential impact to members following this unfortunate incident," Aetna said in a statement provided to the Washington Examiner. "In addition, we are implementing measures designed to ensure something like this does not happen again as part of our commitment to best practices in protecting sensitive health information."

The settlement, announced in Philadelphia Wednesday, requires court approval.