I recently sent an email where I typed code inline in the message body. I spent a good 15 minutes going through and formatting each line of code to look like, well, code. I wanted an extension like Code Blocks that would instantly format my text to a specific preset style.
A well chronicled article by Kelsey Kripp on how to dive right into Apps Script for G Suite to build your own Gmail add on!