If you are running Magento 1.9.x or earlier and your order confirmation email is not sent. This can caused by the new cronjob settings in the Magento 1.9 version.
Order email from 1.9.1 onwards are sent via cronjob so you may have to configure cron.sh file in cronjob in cPanel. However is can be a pain.
- The easiest and the simplest way is to install SMTPPro https://www.magentocommerce.com/magento-connect/smtp-pro-email-free-custom-smtp-email.html from Magento connect. Configure the SMTP setting for an email account.
- In SMTPPro I set Queue Configuration -> Queue usage to: Never
Also make sure Compiler Status: Disabled before installing any Magento Connect extensions.