Fixed TLS upgrade in SMTP

I could not use MyBB on Amazon SES because it was not properly handling TLS. I've edited the source code, and email is working perfectly for me now.