How to Send Email with Go
A while ago, I found myself interested in learning
Go. My regular approach to learn something, is building something. For Go, I decided I would learn by implementing the
SendGrid-Go library. Initially I searched for a SMTP client that would allow everything
SendGrid's SMTP API supports, but I was not very lucky. Therefore I decided to implement my own (
smtpmail). After that I decided to build the SendGrid-Go library on top of my first library and extend it to it would support the
Web API too.
So, on with the example. It's simple to use. First you will need to download and install the library (and its dependencies) by running the following command: