Fix for stream_socket_enable_crypto() error when using Craft CMS and SendGrid

Using Craft CMS with a third-party email service called SendGrid to improve email reliability and the sites I've put on recent servers have been returning the following error: 

stream_socket_enable_crypto(): Peer certificate CN=`' did not match expected CN=`'

I wanted to avoid hacking PHPMailer within Craft CMS, as recommended here and after a lot of experimentation found changing to port 2525 did the trick.