updated script to use a class function to get users. using the app mode to not send emails through mailgun instead of a function parameter.