Health insurer Aetna settled to pay $17 million in reparations after a major mailing mishap revealed the HIV status of thousands of patients.

According to court documents, the display windows of large mailing envelopes revealed confidential medical information. The mailings were sent to approximately 12,000 customers in at least 23 states.

"We've had a number of people tell us they had chosen not to disclose their HIV status to family members—but this is how their family members found out," Sally Friedman, legal director at Legal Action Center, told STAT when the breach happened last August.

Working with the AIDS Law Project of Pennsylvania and several other organizations, the Legal Action Center sent a demand letter to Aetna on behalf of the effected customers.

Aetna called the mistake "unacceptable," and said it was working to review its processes "to ensure something like this never happens again."

Pending the settlement's court approval, Aetna agreed to pay at least $500 to customers whose privacy was disclosed on the front of the envelope. Customers whose names were erroneously disclosed to mail vendors will receive $75 each.