Added code  for sending referral email along with the html code