Create a new table, and call it something like 'peoplecontacted'
and make it look something like
id int auto_increment
userid int
contactid int
date_of_contact datetime
This will be a cross-reference table that links the user to the people he'she has contacted.
Every time someone want's to contact someone else,
you run a query on this table to see how many people this person has contacted this month, and to see if the current destination contact is one of those.
in pseudo SQL:
SELECT DISTINCT contactid FROM table WHERE userid=id_od_current_user AND date_of_contact > (now()-one_month);
(there's probable a more intelligent query for that, but I'm just explaining the basics)
Now you have the contactid's of all the people contacted in the last month.
You can loop through them to see if the current destincation contact is one of them.
If so, allow the email and make a new record in the cross-reference table.
If not, check how many results there were to the previous query. If there were less than 5 results, allow the email and make a new record in the cross-reference table. Otherwise, don't allow the email.
results, d