Since you are using paypal standard, things work a little differently. You can't do anything "after" the user has committed to buy, because by that time they are on the paypal web site.
If you want to do something after, you need to implement IPN and send the email from the IPN page.