<!--
{
  "availability" : [
    "macOS: 12.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MailKit",
  "identifier" : "/documentation/MailKit/MEAddressAnnotation/error(withLocalizedDescription:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "MailKit"
    ],
    "preciseIdentifier" : "c:objc(cs)MEAddressAnnotation(cm)errorWithLocalizedDescription:"
  },
  "title" : "error(withLocalizedDescription:)"
}
-->

# error(withLocalizedDescription:)

Indicates an address is invalid and may result in failure to deliver a message.

```
class func error(withLocalizedDescription localizedDescription: String) -> MEAddressAnnotation
```

## Parameters

`localizedDescription`

A user-visible string with details about the reason the address is invalid.

## Return Value

An annotation that indicates an email address is invalid and may result in failure to deliver a message.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)