Refactor welcome email-send function.