Added fsockopen smtp connection to sendMail to avoid php mail() function problems. Must change this at a later date.