In one of my previous articles, we learned about Golang’s package template (namely text/template and html/template). We shall use html/template here. Also, we shall use Golang’s net/smtp package to connect to Gmail.

Create the folder C:/go_projects/go/src/github.com/SatishTalim/webgmail. In this folder, create a file webgmail.go as follows:

SMTP on port 587 uses TLS. SSL and TLS both provide a way to encrypt a communication channel between two computers (e.g. your computer and a server). TLS is the successor to SSL and the terms SSL and TLS are used interchangeably unless you’re referring to a specific version of the protocol.

You can learn more about writing and deploying web apps with Go from my new book.

I hope you’ve enjoyed this post, please leave any feedback in the comments section.