A small project that collects various nice things to get started with Go Web Development.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

27 lines
489 B

package main
import (
"MY/webapp/config"
email "MY/webapp/common/email"
"context"
)
func main() {
config.Load("config.json")
ctx := context.Background()
msg := email.EmailMessage{
To: "tina.recip@example.com",
From: "toni.sender@example.com",
Subject: "This is my first mail.",
TextTemplate: "signup",
HTMLTemplate: "signup",
}
sender := email.NewSender(ctx)
defer sender.Close()
err := sender.QueueEmail(msg)
if err != nil { panic(err) }
}