Skip to content
This repository has been archived by the owner on Oct 4, 2020. It is now read-only.

Latest commit

 

History

History
17 lines (15 loc) · 421 Bytes

README.md

File metadata and controls

17 lines (15 loc) · 421 Bytes

email

import "github.com/golang-common-packages/email"

// This is for both SendGrid and GoMail
mailClient := email.NewMailClient(email.SENDGRID, &email.MailConfig{
    URL:       "",
    Port:      "",
    Username:  "",
    Password:  "",
    SecretKey: "",
}),

if err := mailClient.Send("fromEmail", "recipientEmail", "subject", "message"); err != nil {
    log.Printf("Can not send: %s", err.Error())
}