title: How to check if email has been sent already
body: <p>I have a (PHP) script which runs on a new row in MySQL. However, it will continually send the emails, even if they've already been sent...causing mass emails into the users Inbox. </p>
  
  <p>The script is quite big, so I cant paste it here - <a href="http://pastebin.com/6v75F4Gv" rel="nofollow noreferrer">http://pastebin.com/6v75F4Gv</a> </p>
  
  <p>Is there anyway I can somehow check if this script has already sent 'xx' email, but if a new row containing 'zz' and the user has specified they wish to receive content containing 'zz' it sends the 'zz' row?</p>
  
  <p>ie. It stops duplicate/etc. emails.</p>
  
  <p>Note: MySQL table is in the following format: <br />
  Table: <code>feed</code> <br />
  Rows in pager:  <code>id</code>, <code>title</code>, <code>description</code>, <code>date</code> <br /><br />
  Table: <code>recipients</code> <br />
  Rows in recipients: <code>id</code>, <code>email</code>, <code>suburb</code></p>
  
  <p>Thanks :)</p>