In many chapters of this book, we've explored ways of building a Go-based email application called GoMail. All of these examples have used a dummy email server—some code in the client package, which allows us to build the GUI portions of a mail client without needing to manage server communication. In this final appendix, we step through adding code to connect to a real email server.
Building on the exploration in Chapter 12, Concurrency, Networking, and Cloud Services (particularly the authentication—OAuth 2.0 example), we'll use the Gmail public API and the built-in capabilities of the Go language to bring this together.