Fix for issue #667
Merge pull request #668 from sevenymedia/develop

Fix for issue #667

Reviewed-By: Jared Hancock <jared@osticket.com>
lint: Add email address validation
Merge pull request #673 from greezybacon/issue/733

lint: Add email address validation

Reviewed-By: Peter Rotich <peter@osticket.com>
email: Fetch headers from db for bounce detection
email: No alerts or autoresponses on bounce emails
html: Be careful not to strip too much

If there is content between to <style> elements, the content was previously
stripped by Format::safe_html function. This patch adjusts the regex to
strip tags such as <head>, <script> and <style> so that if content is found
between two of them, it will be preserved.
Change collation to utf8_general_ci

This is necessary to avoid illegal mix of collations error during upgrade
for MySQL with strict language setting.
Unpack the files uploaded by staff on new ticket in the context of response

Staff uploaded files, on new ticket, were getting attached to message instead of
response.
fix: Make attachments unique per thread entry instead of the ticket thread

The bug prevented attachments from being sent out if it was previously
attached to the ticket - for example, you could resend a file to end user.
Merge pull request #686 from greezybacon/issue/674

html: Be careful not to strip too much

Reviewed-By: Peter Rotich <peter@osticket.com>
Merge pull request #684 from greezybacon/issue/bounce-detection-again

Bounce detection again

Reviewed-By: Peter Rotich <peter@osticket.com>
Merge pull request #687 from protich/issue/collation

Change collation to utf8_general_ci

Reviewed-By: Jared Hancock <jared@osticket.com>
Merge pull request #688 from protich/issue/attachments

Fixup attachments attached to the response for new-ticket by staff

Reviewed-By: Jared Hancock <jared@osticket.com>
Merge remote branch 'upstream/develop' into develop-next

Conflicts:
	include/class.mailfetch.php
	include/class.mailparse.php
	include/class.thread.php
	scp/js/ticket.js
oops: Require '@' for valid email address