You are making a call to a gateway to send an email on your behalf, which is not bounded time-wise, from a Vision button. Vision button scripts, like all component events, runs in the java Swing foreground thread. Doing any long-duration (seconds) action on the foreground thread will block the user interface. In prior versions of Ignition, it could freeze indefinitely.
You need to learn to use system.util.invokeAsynchronous()
to run your email send operation on a background thread, and report a notification back to your user at the end. Start here: