The U.S. Postal Service, which warned Congress this spring it would run out of cash in five years, lost $2.3 billion in the past quarter even with growth in lucrative package-delivery sales.

“We continue to face imbalances in our business model that must be fixed through legislative and regulatory change,” Postmaster Megan J. Brennan said in a statement Friday, noting that mandated costs continue to rise faster than the service can bring in new sales.

“Our ability to generate revenue is constrained by law, and our ability to manage costs is equally constrained,” she said on a conference call later with reporters and analysts.

Chief among the obstacles is a requirement imposed in 2006 that the organization pay in advance for retiree health benefits, rather than covering them as they come due, the practice of most government agencies and private companies.

That alone costs the service $7.1 billion a year and has contributed to 11 years of losses, including one of $3.9 billion in 2018. The organization has stayed afloat largely by defaulting on $48 billion in mandated payments over the past several years, Brennan said during an April hearing called by the House Committee on Oversight and Reform, and its operations are further complicated by inflation-linked caps on price increases for key products.

Traditional revenue sources continued to dwindle during the three months through June, the organization said Friday, with first-class mail shrinking 1.6%, marketing mail slipping 3% and magazines and periodicals dropping 11%.

To cope, Brennan said, the service will have to pursue new revenue opportunities and continue to improve its efficiency while working with policymakers on a pricing system that will “provide greater flexibility and better meet the needs of the organization.”

While the House Oversight Committee has previously attempted to push through legislation addressing the Postal Service’s existential dilemma, its last bill — drafted in 2017 — failed to make it to the House floor. Brennan remains optimistic that the panel will complete a new bill that fares better this year.

“I have long said that while our financial problems are serious, they are solvable,” she added.

The Postal Service has operated at a disadvantage since the healthcare pre-funding requirement was imposed in the Postal Enhancement and Accountability Act of 2006.

One year later, then-Apple CEO Steve Jobs introduced the iPhone, which enabled users to access bills and correspondence from a handheld device that previously were sent by mail, increasing the competitive threat from internet services.

Ironically, though, the growing leverage of digital capabilities by U.S. industry has also benefited the Postal Service, which handles the last leg of delivery for internet superstore Amazon and its e-commerce rivals as well as shippers such as FedEx and UPS.

Revenue from shipping and packages climbed $250 million, or 4.8%, to $5.24 billion in the most recent quarter, though President Trump has repeatedly blamed the organization’s troubles partly on under-charging Amazon.