Mailer is a simple email sending microservice and library built with Go.
To install and start Mailer, run the following commands:
git clone https://github.com/wizzldev/mailer.git
# Change to the Mailer directory and start the service
cd mailer
make run
To use the Mailer client, run the following command:
go get github.com/wizzldev/mailer/client
To send an email using the Mailer client, run the following command:
package main
import (
"fmt"
mailer "github.com/wizzldev/mailer/client"
)
func main() {
client := mailer.NewClient("http://localhost:3000")
err := client.SendText("[email protected]", "Hello", "Hello, world!")
if err != nil {
fmt.Println(err)
return
}
fmt.Println("Email sent!")
}