Update libraries/joomla/mail/helper.php

Updated the JMailHelper with the filter_var function

Please read the following URL for more information:
>  https://github.com/joomla/joomla-platform/pull/1833