Saying it violates laws isn't necessarily correct as it very much depends on the content you're sending. (The opt-in approach would also matter too.)
However, XF1 doesn't have support for generating an unsubscribe link like this in emails sent from the "email users" section. You could only link to the appropriate account page URL where they can disable it or allow them to reply to unsubscribe (which is a valid approach) or use an add-on. XF2 has a "token" you can use to do this.