final.php script includes
email_receipt.php, whose role it is to email a receipt to the customer. Because a lot of information could be in this receipt (itemizing multiple products), sending an HTML receipt is a logical choice. Considering that some people like HTML email and others don’t, the professional solution is to send an email that’s viewable in either HTML (Figure 10.18) or plain text format (Figure 10.19). That’s what
email_receipt.php will do.
You can also use the PEAR Mail_Mime ...