Okay, to answer my own question – I just had to rewrite the function and use .on(), as it listens to changes in the DOM. Like this:
$(document).on( 'click', '.email', function() {
var $this = $(this);
$this.parent().toggleClass('open');
});
Inspired by this piece of documentation:
https://facetwp.com/use-jquery-on-instead-of-click/