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.
26 lines
457 B
26 lines
457 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.",
|
|
Template: "signup",
|
|
}
|
|
|
|
sender := email.NewSender(ctx)
|
|
defer sender.Close()
|
|
|
|
err := sender.QueueEmail(msg)
|
|
if err != nil { panic(err) }
|
|
}
|
|
|