In this article, we will explore a Go implementation for sending emails using different drivers (AWS SES and SMTP). We will discuss the patterns used, how to use the implementation, and how to test it.
The builder pattern is used to create different configurations for sending emails. Depending on the environment configuration, the appropriate email driver (AWS SES or SMTP) is instantiated.