Bug fixes, MySQL compatibility, and simplified log() function
SendMailTask was failing if email did not have any email headers