func (c *Config) Validate() error {
	if c.FromAddress == "" {
		return errors.New("mailer requires from address")
	}
	if c.FromName == "" {
		return errors.New("mailer requires from name")
	}
	if c.APIKey == "" {
		return errors.New("mailer requires api key")
	}
	return nil
}
Validate runs sanity checks of a Config struct.
This is run before a new client is created
to ensure there are no invalid API
calls.
package mail
import "errors"
type Config struct {
	URL         string
	APIKey      string
	Domain      string
	FromAddress string
	FromName    string
	Password    string
	Port        int
}