Enabling and configuring Database Mail in SQL Server using T-SQL

Having had to run through this process again recently, I thought I’d tidy up my notes on all of this,