Are you using paypal standard?
The problem with paypal standard is that it is not a real time payment method.
just because the user has returned to your site, does not mean the order is successful, it only means the order is placed in a queue to be processed. Send ing a receipt when the user lands on the return page would be premature.
I Recommend using payp[al express instead.
to set up paypal express, choose payments pro in the checkout wizard, then delete the checkout form on the checkout page using only the checkout with paypal button.
express checkout is free like Standard, but it is a real time processing method, and in the checkout wizard, you can set up the email receipt.
using paypal standard, you would need to set up an IPN page:
https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNIntro/