Skip to content

Instantly share code, notes, and snippets.

@asim
Last active February 8, 2022 11:33
Show Gist options
  • Save asim/f0aba4371302f321e98ea7ed9188192c to your computer and use it in GitHub Desktop.
Save asim/f0aba4371302f321e98ea7ed9188192c to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"os"
"go.m3o.com/user"
)
// Send a verification email
func main() {
userService := user.NewUserService(os.Getenv("M3O_API_TOKEN"))
rsp, err := userService.SendVerificationEmail(&user.SendVerificationEmailRequest{
Email: "[email protected]",
FailureRedirectUrl: "https://m3o.com/verification-failed",
FromName: "Awesome Dot Com",
RedirectUrl: "https://m3o.com",
Subject: "Email verification",
TextContent: `Hi there,
Please verify your email by clicking this link: $micro_verification_link`,
})
fmt.Println(rsp, err)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment