Conditional Email setting

Hi,

In a VAd supplier company want to monitor their quotation process as follow.

If they have a end user(C) who communicate two re sellers let say A and B for the same product quotation of two different sales person X and Y.They process the quotaion, now CRM should check the Enduser and Product information in quotaion-quotaion details table in last 15 days,if its match CRM send a mail to sales head.

How to do it?

Thanks.