I'm a bit unsure about this one. My gut instinct tells me he really didn't think she was underage, because if he did he would very unlikely have sent a photo to his friend. Paedos know to keep it secret. They don't broadcast it. If he thought he was having sex with a twelve year that sort of image would only be shared with a fellow paedo. You wouldn't keep evidence you had sex with her and send it to a mate.
I've also met girls who are in this age range and do act and present a lot older, much is to do with their upbringing and who they spend time with ie older kids.
So I'm not sure. Both of them are saying he didn't know. I think there is a possibility this is really the truth.
On the other hand his image sending and associated message is appalling, but that's not why he is going to jail.