func postmarkExample() {
	mail := new(gomail.MailService)
	mail.FromName = "No Reply"
	mail.FromUsername = "no-reply"
	mail.FromDomain = os.Getenv("EMAIL_FROM_DOMAIN")
	if len(mail.FromDomain) == 0 {
		log.Fatal("missing env: EMAIL_FROM_DOMAIN")
	}
	toRecipients := os.Getenv("EMAIL_TEST_TO_RECIPIENT")
	if len(toRecipients) == 0 {
		log.Fatal("missing env: EMAIL_TEST_TO_RECIPIENT")
	}
	mail.PostmarkServerToken = os.Getenv("EMAIL_POSTMARK_SERVER_TOKEN")
	if len(mail.PostmarkServerToken) == 0 {
		log.Fatal("missing env: EMAIL_POSTMARK_SERVER_TOKEN")
	}
	provider := gomail.Postmark
	err := mail.StartUp()
	if err != nil {
		log.Printf("error in StartUp: %s using provider: %x", err.Error(), provider)
	}
	email := mail.NewEmail()
	email.HTMLContent = "<html><body>This is a <b>go-mail</b> example email using <i>HTML</i></body></html>"
	email.Recipients = []string{toRecipients}
	email.Subject = "example go-mail email using Postmark"
	if err = mail.SendEmail(email, provider); err != nil {
		log.Fatalf("error in SendEmail: %s using provider: %x", err.Error(), provider)
	}
	log.Printf("email sent!")
}
postmarkExample shows an example using Postmark as the provider
package main
import (
	"log"
	"os"
	"strconv"
	gomail "github.com/mrz1836/go-mail"
)
func main() {
	awsSesExample()
}
func awsSesExample() {
	mail := new(gomail.MailService)
	mail.FromName = "No Reply"
	mail.FromUsername = "no-reply"
	mail.FromDomain = os.Getenv("EMAIL_FROM_DOMAIN")
	if len(mail.FromDomain) == 0 {
		log.Fatal("missing env: EMAIL_FROM_DOMAIN")
	}
	toRecipients := os.Getenv("EMAIL_TEST_TO_RECIPIENT")
	if len(toRecipients) == 0 {
		log.Fatal("missing env: EMAIL_TEST_TO_RECIPIENT")
	}
	mail.AwsSesAccessID = os.Getenv("EMAIL_AWS_SES_ACCESS_ID")
	mail.AwsSesSecretKey = os.Getenv("EMAIL_AWS_SES_SECRET_KEY")
	if len(mail.AwsSesAccessID) == 0 {
		log.Fatal("missing env: EMAIL_AWS_SES_ACCESS_ID")
	}
	if len(mail.AwsSesSecretKey) == 0 {
		log.Fatal("missing env: EMAIL_AWS_SES_SECRET_KEY")
	}
	provider := gomail.AwsSes
	err := mail.StartUp()
	if err != nil {
		log.Printf("error in StartUp: %s using provider: %x", err.Error(), provider)
	}
	email := mail.NewEmail()
	email.HTMLContent = "<html><body>This is a <b>go-mail</b> example email using <i>HTML</i></body></html>"
	email.Recipients = []string{toRecipients}
	email.Subject = "example go-mail email using AWS SES"
	if err = mail.SendEmail(email, provider); err != nil {
		log.Fatalf("error in SendEmail: %s using provider: %x", err.Error(), provider)
	}
	log.Printf("email sent!")
}
func mandrillExample() {
	mail := new(gomail.MailService)
	mail.FromName = "No Reply"
	mail.FromUsername = "no-reply"
	mail.FromDomain = os.Getenv("EMAIL_FROM_DOMAIN")
	if len(mail.FromDomain) == 0 {
		log.Fatal("missing env: EMAIL_FROM_DOMAIN")
	}
	toRecipients := os.Getenv("EMAIL_TEST_TO_RECIPIENT")
	if len(toRecipients) == 0 {
		log.Fatal("missing env: EMAIL_TEST_TO_RECIPIENT")
	}
	mail.MandrillAPIKey = os.Getenv("EMAIL_MANDRILL_KEY")
	if len(mail.MandrillAPIKey) == 0 {
		log.Fatal("missing env: EMAIL_MANDRILL_KEY")
	}
	provider := gomail.Mandrill
	err := mail.StartUp()
	if err != nil {
		log.Printf("error in StartUp: %s using provider: %x", err.Error(), provider)
	}
	email := mail.NewEmail()
	email.HTMLContent = "<html><body>This is a <b>go-mail</b> example email using <i>HTML</i></body></html>"
	email.Recipients = []string{toRecipients}
	email.Subject = "example go-mail email using Mandrill"
	if err = mail.SendEmail(email, provider); err != nil {
		log.Fatalf("error in SendEmail: %s using provider: %x", err.Error(), provider)
	}
	log.Printf("email sent!")
}