Ticket #1249: added code for email confirmation of purchase