email function created to mail everyone in thread