first pass at email sending logic using complex headers