This is a very upsetting thread. I also have a 12 year old daughter.
I would never allow her to date an older boy like that, would not allow the texts, nothing. Because you know it only means sex - they are not going off and having some meaningful life conversation - its about sex.
Mom needs to understand by allowing the contact, she is setting up her daughter for a lot of trouble. Why flirt if you can't move to the next step? Why put daughter in that position?
I think it would be great if (as suggested) you and mom have a formal sit down with a criminal attorney. Mom needs a serious wake-up call...and the suggestion of talking to the boys parents...I understand they don't care. However, after your chat with the criminal attorney, maybe it would be good for them to be informed of possible legal consequences if these two continue down their path with no intervention. It would be a service to the 17 year old to know that having sexual relationships with children, especially when he turns 18, has major legal consequences that could be very long term and affect every aspect of his life - college, getting jobs, everything.
IF intervention doesn't happen, and these two continue onwards, the daughter would be in for a rude awakening as well, seeing her honey facing such serious consequences. Who will she be angry with then? I'd be angry at my parents for allowing any of it to happen. I only see confusion and pain on this path...I just don't get why mom thinks this is an OK thing for her CHILD. Oh well.