I used to do drug minimisation talks in schools as part of a peer-to-peer scheme. We didn't judge or tell them "just say no" (as it's an ineffective message).
The single most important message we had for them was to make sure they knew where to get help if they needed it.
As others have said, Ecstacy isn't as worrying as other stronger and more addictive drugs although it does have some risks. It encourages empathy for others and dancing. As drugs go, there are a lot worse out there. Your daughter may only be doing Ecstacy or she may be doing lots of different drugs and may not necessarily admit this to you. Even if she is taking drugs as responsibly as she can (i.e. researching the risks and acting accordingly) she likely knows others who aren't.
If I had to talk to my kids about this, I'd want to talk through - do they know where to go if they need help? Are they aware of any drugs helpline numbers for example. I might frame it did they know where to get help for themselves or a friend.
Do they know basic harm minimisation for Ecstacy? eg about the risks of overheating but also of drinking too much water and especially about lack of purity of pills. (I'm out of touch now, best to look up what the latest advice is). Back in the day kids used to be able to get pills tested if they knew where to go, I doubt this exists anymore.
But perhaps more importantly do they know how to get support for any other stuff going on in their life (and which you may even be unaware of).
The vast majority of young people I knew who took drugs - even large amounts- as teens, grew up into respectable adults. They are your GPs, nurses and consultants, your children's teachers and head teachers, office workers, business leaders and charity workers. Drugs are very common indeed in the UK.
The kids who didn't do so well in my own experience mostly seemed to be those with issues they were running from / using the drugs as a crutch for those issues.