Custom Function to populate Email Field in Opportunity from Related Lookup Field

Custom Function to populate Email Field in Opportunity from Related Lookup Field

Hi,

I would like to populate a custom field called "Contact Email" on the opportunity module, with the email address of the related contact from a lookup field in the Contacts module.

I have been attempting to write with as a custom function but could do with some help with the deluge script please.