I'd say something like this should do it, haven't testet it though 😉
<?php
session_start(); // starting a session
$email = "someone@somewhere.com"; // The address that the user want's to send to.
reset($emails); // return the pointer to the beginning of the array
while(list($key,$val) = each($emails)) {
if ($val == $email) {
echo "You cannot send an email to the same address twice.";
exit;
}
else {
mail($email yada yada yada yada);
$emails[] = $email; // now that the mail has been send we register the address in the $emails array so that it cannot be used later in this session.
session_register("emails");
}
}
?>