mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-11 18:44:26 +00:00
Spam
An m3o.com API. For example usage see m3o.com/spam/api.
Endpoints:
Classify
Check whether an email is likely to be spam based on its attributes
https://m3o.com/spam/api#Classify
package example
import(
"fmt"
"os"
"go.m3o.com/spam"
)
// Check whether an email is likely to be spam based on its attributes
func ClassifyAnEmail() {
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)
}
Classify
Check whether an email is likely to be spam based on its attributes
https://m3o.com/spam/api#Classify
package example
import(
"fmt"
"os"
"go.m3o.com/spam"
)
// Check whether an email is likely to be spam based on its attributes
func ClassifyAnEmailUsingTheRawData() {
spamService := spam.NewSpamService(os.Getenv("M3O_API_TOKEN"))
rsp, err := spamService.Classify(&spam.ClassifyRequest{
})
fmt.Println(rsp, err)
}