i've dealt with something similar to this in the past, however it was a server downloading files instead of sending out emails.
once the user submits, just simply
fork off your mailing process (giving it all the info it needs... to, from, message etc.) This should run in the background while the browser is redirected to your CGI progress page, thus not causing your webpage to hang while emails are being sent.
In my case i just made a command line script that was set to take in command line arguments. i think i implimented it by just using an exec(ftp_dl <arguments>). So i'm not sure how you might impliment this using exclusively webpages.