Here's one way. There are probably others.
Create a table in a database called sendmail_status which has a id auto_increment int field and a status char(1) field.
details.php posts to sendmail.php. When sendmail.php runs, do the following:
1. add new record to table, set status="P" for processing and get the id field
2. print a meta refresh tag or a location header that redirects to another page called timewaster.php?id=$id leaving the sendmail.php to continue processing.
3. In sendmail.php, after the mail is sent, update the table, set status="D" for done.
4. In timewaster.php, check the status of $id. If it's "D", then print a redirect (method of your choice) to done_sending_mail.php that says, "Thank You. Your Mail is Sent". If the status is "P", then display a meta refresh to timewaster.php?id=$id with a 3 second timer and then display an animated gif.
Bonus points if the animated gif includes dancing penguins.