I have a list of (email) objects which has a lookup field. When an email is received in my document library, I have added code to the EmailEventReceiver to see if the email address matches an applicant that exists in another list. If a match is found (ie if the incoming email address matches a saved email address of an applicant), then I assign the applicantID to the applicant lookup field of the email object. All of that works well and hunky dory.
My next challenge is to either automatically or manually run the same type of code periodically on any email objects that are yet to be assigned. In other words, if I receive an email from an applicant that doesnt yet exist, but I have since receiving the email created an applicant, to then update all the email items in the list with his association.
I thought, in the time being, to add a 'button' on the page which when clicked would then run the same type of C# code on the list.
Is this possible? Is there a better way to do this?