fix error in email per environments