Updated email handling