WASHINGTON—As the seeds of the financial crisis were being sown, a Citigroup Inc. trader sent an internal email warning about the poor quality of mortgages the bank was packaging into securities and selling to investors.

"We should start praying," the trader wrote in the email.

On Monday, the bank agreed to pay $7 billion, including...