IMO these statements contradict themselves:
> Idempotency refers to the ability of an operation to be performed multiple times whilst still yielding the same outcome
and
> The issue with the above code is that if the event is processed twice the EmailService will send a duplicate email.
In other words, the operation (three lines of code) yields the same result (sending an email) after repeated execution, and thus is idempotent isnt it?
Or is the point that idempotency is harmful in this case?