A Go wrapper for the go-ohmysmtpOhMySMTP email service.
Package
https://github.com/jackcoble/go-ohmysmtp
Examples
Send an email.
package main
import (
"log"
"github.com/jackcoble/go-ohmysmtp"
)
func main() {
// Create a new API client using API key
client := ohmysmtp.NewClient("MY_API_KEY")
// Construct a payload
payload := Payload{
From: "[email protected]",
To: "[email protected]",
Subject: "Sending an email using OhMySMTP!",
TextBody: "Body that can either be text or HTML",
}
// Send the email
if err := client.Send(payload); err != nil {
log.Fatal(err)
}
}