Files
2022-01-12 15:03:53 +00:00
..
2021-12-09 15:06:12 +00:00
2022-01-12 15:03:53 +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)
	
}