handling emails for dev and prod