XAMEETINGS-74: Notify the users that the mails have been sent successfully

Never do that (inline javascript), unless you have a very good argument for it. You can consult Google on all the reasons why that is generally a bad idea (not cacheable, increase page download time, spaghetti code, etc).

On your particular case, you are mixing a server-side operation done on page reload with a client side notification, which is not, IMO, the best way to go.

You either:
* do both the server side operation an the notification on a page reload, so performing the operation and then using a success macro to display the success of the operation (possibly with a dismiss button for the notification if you really have to) OR
* do both operations on the client side, meaning that you have a JSX that on click sends an AJAX call to the server to perform the operation, displays a loading message and, finally, displays a JS notification for the success or failure of the operation, all of this without reloading the page.

Whatever you choose, don`t do inline javascript, mkay? :)