Basically all you would do is the following:
1. Before you run the exec() command you will want to insert data into a database table. I usually use MySQL, but you could use anything, including a text file for this. If you do not know how to insert data into a mysql table, look for tutorials on using php/mysql on Google. Unless you get someone to write the whole thing for you, you will probably need to understand the basics in working with a mysql table in php.
2. Now on the php shell script (emailsend.php), you will simply select the row that you just added in the other script. I am not sure if you can send get variables to a php shell script or not, but it would be easy to test (so instead of emailsend.php it would be emailsend.php?var1=value1). You would want to pass the primary key value from your main script to emailsend.php so that you could select the correct row.
Doing it this way would display the thank you page before the exec() command finished, which would make sense if it takes your server a while to send emails. You could also use this same technique to run a cron job that processes emailsend.php (like what d_barszczak suggested).