Configuring MediaWiki to use external SMTP

At my new company, I setup a copy of MediaWiki and wanted to make sure that all the notifications work. One kink was that the mail needed to be sent through an external service called SendGrid. Since I setup MediaWiki and it is for internal use only, I could probably have skipped the email service but it seemed like a good exercise. Fortunately, MediaWiki has the capability to do this...