Mail: SmtpMailer uses HTTP_HOST instead of SERVER_NAME [Closes #1184]
Mail: getRandomId() relies on HTTP_HOST and php_uname (for CLI). HTTP_HOST is checked.
Http: supports for IPv6 address in HTTP_HOST [Closes #1185]