Actually, if you could log into your MyCIC account, you'd solve this problem entirely.
When you are refused after an online application, you just get a PDF form of the refusal letter. They do not ask for your passport to put it in an envelope with a refusal letter.
They send your passport with a refusal letter to you when you submit your passport with your application.