I have a form that accesses a MySQL database and then sends an email out.
Access to the database is quick, but doing the email process is slow in comparison, which causes issues with users thinking the web page is hung while waiting for mail()
to finish.
Without getting into a conversation of controlling the user behavior, is it possible to create a thread or a callback in PHP that will allow me to send the mail routine to the background so normal operation of the page can continue? Net net, is I don't want to have to wait on the process to finish and stall the page but I am willing to kick it off and check on its results later, or even click and forget it.
Yes there are alternatives by using JS but I wanted to look at options first.
Here are some caveats:
1. I don't have shell access.
2. This runs on a Windows server with no remote capability.
3. I can only create pages on my local machine and upload via ftp (ie. Godaddy)