Imagine you want to say something particular to somebody but when you meet him/her you forget to mention the thing right away and you talk about different things for a while until a bit later when you remember it and you say:
Oh I was almost to forget to mention that you got some mail.
I know it is likely to be grammatically wrong, I just wrote down what came to mind.
How do you say it in casual and formal ways?
This is not a case where you forgot to mention it in a previous conversation and this is not a case where you should have mentioned it before. You got the mail after the last time you had seen him/her. My sentence is a kind of conversational thing to say to myself. I don't have to say it aloud.