Rewrite the following sentences using inversion.
He realized his mistake only after the email had been sent. ...