You know that doesn't make sense, don't you?
I know this hurts. I know your instinct will be to believe what he says and try to paper over this. The problem with that is that it falls in at a later date and the hole is huge then, the damage is done - it festers. If you want a chance to save this (or even if you don't, really) it has to be dealt with now.
He's saying the right things but he's also sticking to the script. Has he done anything to show you that he's sorry? He wasn't going to tell you - if you hadn't picked his phone up, you'd be shooting towards your wedding with no idea about this woman.
If you'd said he started the messages, I'd have believed maybe he fell for her, and he was desperately seeking her attention and trying to find out if she felt the same. It's very common, unfortunately, for men not to leave their partners until someone else is lined up.
The closest thing to what he's said is that they bonded over their terrible relationships - usually how little attention they get at home, that there's no sex, etc. They sleep together, she tells him it can't happen again and they either agree not to mention it via text or he deletes the messages. She tells him to talk to you because she doesn't want to be the OW. He says he loves her to see if she feels the same, to tempt her into being his next option. If she'd said it back, he'd have been gone. As she doesn't feel the same, he's desperately clinging on to you.
Nobody tells someone they love them because they are bored, or just friends, or want attention. Especially not if the other person isn't reciprocating. He was testing the water. He needs to be honest with you about that, at least.