Send mail with a progress bar

Unfortunately it doesn’t answer my question.

I’m glad you have found a way to make this work for you, but take into account that a user may want to continue doing stuff if it’s going to take some time to process all the emails. Or he might click reload by mistake or navigate back. What’s worse is that if there is an issue on the server the user might stay there looking at a screen when nothing is happening.

What I’m trying to say is that this is not a very good solution UX wise. As mentioned previously in this thread a more elegant solution would be to communicate with the server via websockets and show the user a nice toast when all the emails have been processed so he can continue working. Even better would be to handle the scheduling to a queue on the server.

I know you mentioned that you are not on nodejs so all that is out of the equation. My advise is that unless you are developing this for a client that requires your work to be strictly in PHP/ASP or you don’t get paid you should consider migrating to nodejs which will allow you to develop more elegant solutions to the issues you encounter now and in the future.

2 Likes

Hi, unfortunately my english is not good so sometimes I can’t explain myself well.
I am aware that there are better ways to deal with my problem, but:

  • I have to use ASP.net because the project is shared with a management software
  • those who use my email page are a small part of those who use the software. They are users with whom I even speak on the phone. They are not users who come to the page by chance from the internet. Each of them has a variable number of contacts, which in any case will never take more than 40-50 seconds to send.
    In this case, it would be a matter of seeing the counter that is updated, so if one of our users wants to “escape” he can do it, but it is well indicated that the operation will not be successful.
    I thought I’d post my solution, even if it’s not elegant.
    I apologize for this.
    But many times instead of finding help I found people who told me “you have to do as I say”, without considering as in this specific case that it is not a simple page but is connected to a subsystem that is stable and I cannot change the language programming (also because I would not be able to, in my company I also deal with other things!)

Yeah I said I am glad your solution works for you and your specific needs but as you marked your post as solution and shared it for others to learn I just wanted to mention that even if this might work for your use case there is a more elegant solution to this problem if people use nodejs as server as someone might read your post and think that it’s a good way to tackle this problem in Wappler. It’s a good workaround given the limitations of asp.net and php server models.

:+1:t3: