Fixes in hash email send function