My entire script is here.
https://gist.github.com/johnnydecimal/e7b1a03e26b79239363b5d...
Though I've since updated that to include a .txt file as the body vs. typing it out in the email. But that's easy enough.
I might have added TXT records to satisfy DKIM etc., I don't remember. There are guides on the Amazon site; I'm a bit of a dummy when it comes to this so if I worked it out it must have been obvious enough.