 <p>You will have to store the notifications in a separate table, with two fields : question_id, upvoter_id. If a row already exists for the <code>user 2</code> and the question_id, dont send the email, otherwise add row and send the mail.</p>