mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-11 18:44:26 +00:00
21 lines
379 B
Go
Executable File
21 lines
379 B
Go
Executable File
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)
|
|
|
|
}
|