converting to new email header logic