GDPR and predatory/spam journals
It might help, if the people writing those emails are law-abiding.

However, since, a large proportion of such emails are trying to get money out of you by fraudulent means (publication fees or conference fees), they're probably not fussed about breaking another law as well.