Mail

enum Mail : Error, CustomStringConvertible

The Exception.Mail enum contains all the errors thrown for the mail send API.

  • The error thrown when an email address was expected, but received a String that isn’t RFC 5322 compliant.

    Declaration

    Swift

    case malformedEmailAddress(String)
  • The error thrown when an email is scheduled further than 72 hours out.

    Declaration

    Swift

    case invalidScheduleDate
  • The error thrown if the subscription tracking setting is configured with text that doesn’t contain a <% %> tag.

    Declaration

    Swift

    case missingSubscriptionTrackingTag
  • The error thrown if a personalization doesn’t have at least 1 recipient.

    Declaration

    Swift

    case missingRecipients
  • The error thrown when the SpamChecker setting is provided a threshold outside the 1-10 range.

    Declaration

    Swift

    case thresholdOutOfRange(Int)
  • The error thrown when more than 25 unsubscribe groups are provided in the ASM struct.

    Declaration

    Swift

    case tooManyUnsubscribeGroups
  • The error thrown if the number of personalizations in an email is less than 1 or more than 100.

    Declaration

    Swift

    case invalidNumberOfPersonalizations
  • The error thrown if an email doesn’t contain any content.

    Declaration

    Swift

    case missingContent
  • The error thrown if a Content instance has an empty string value.

    Declaration

    Swift

    case contentHasEmptyString
  • Thrown if the array of Content instances used in an Email instances is in an incorrect order.

    Declaration

    Swift

    case invalidContentOrder
  • Thrown when an email contains too many recipients across all the to, cc, and bcc properties of the personalizations.

    Declaration

    Swift

    case tooManyRecipients
  • Thrown if an email does not contain a subject line.

    Declaration

    Swift

    case missingSubject
  • Thrown if a reserved header was specified in the custom headers section.

    Declaration

    Swift

    case headerNotAllowed(String)
  • Thrown if a header’s name contains spaces.

    Declaration

    Swift

    case malformedHeader(String)
  • Thrown if there are more than 10 categories in an email.

    Declaration

    Swift

    case tooManyCategories
  • Thrown if a category name exceeds 255 characters.

    Declaration

    Swift

    case categoryTooLong(String)
  • Thrown when there are too many substitutions.

    Declaration

    Swift

    case tooManySubstitutions
  • Thrown when an email address is listed multiple times in an email.

    Declaration

    Swift

    case duplicateRecipient(String)
  • Thrown when the number of custom arguments exceeds 10,000 bytes.

    Declaration

    Swift

    case tooManyCustomArguments(Int, String?)
  • Thrown when an attachment’s content ID contains invalid characters.

    Declaration

    Swift

    case invalidContentID(String)
  • Thrown when an attachment’s filename contains invalid characters.

    Declaration

    Swift

    case invalidFilename(String)
  • Thrown when a category has been specified more than once.

    Declaration

    Swift

    case duplicateCategory(String)
  • A description for the error.

    Declaration

    Swift

    public var description: String { get }