Custom Function to Populate Email Field in Custom Module for Related Lookup Field Contact

Custom Function to Populate Email Field in Custom Module for Related Lookup Field Contact

Hi,

I would like to populate the Email field with the email address of the related contact from a lookup field in a custom module "CustomModule3". 

Im sure this can be achieved using a workflow / custom function however need help with the deluge script please.