SpamChecker
public struct SpamChecker : Encodable
The SpamChecker mail setting allows you to test the content of your email
for spam.
-
The threshold used to determine if your content qualifies as spam on a scale from 1 to 10, with 10 being most strict, or most likely to be considered as spam.
Declaration
Swift
public let threshold: Int? -
A webhook URL that you would like a copy of your email along with the spam report to be POSTed to.
Declaration
Swift
public let postURL: URL? -
A
Boolindicating if the setting is enabled or not.Declaration
Swift
public let enable: Bool
-
Initializes the setting with a threshold and optional URL to POST spam reports to. This will enable the setting for this specific email even if it’s normally disabled on your SendGrid account.
If the spam checker setting is enabled by default on your SendGrid account and you want to disable it for this specific email, then use the
init()initializer instead.Declaration
Swift
public init(threshold: Int, url: URL? = nil)Parameters
thresholdAn integer used to determine if your content qualifies as spam on a scale from 1 to 10, with 10 being most strict, or most likely to be considered as spam.
urlA webhook URL that you would like a copy of your email along with the spam report to be POSTed to.
-
Initializes the setting with no threshold, indicating that the spam checker setting should be disabled for this particular email (assuming it’s normally enabled on the SendGrid account).
If you want to enable the spam checker setting, use the
init(threshold:url:)initializer instead.Declaration
Swift
public init()
-
Validates that the threshold is within the correct range.
Declaration
Swift
public func validate() throws
View on GitHub
SpamChecker Structure Reference