Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2021-11-11 17:37:18 +00:00
parent baff11e1d7
commit bd1dcf3fed
23 changed files with 941 additions and 837 deletions

View File

@@ -0,0 +1,20 @@
package main
import (
"fmt"
"os"
"go.m3o.com/spam"
)
// Check whether an email is likely to be spam based on its attributes
func main() {
spamService := spam.NewSpamService(os.Getenv("M3O_API_TOKEN"))
rsp, err := spamService.Classify(&spam.ClassifyRequest{
From: "noreply@m3o.com",
Subject: "Welcome",
To: "hello@example.com",
})
fmt.Println(rsp, err)
}