---
title: "error(withLocalizedDescription:)"
framework: mailkit
role: symbol
role_heading: Type Method
path: "mailkit/meaddressannotation/error(withlocalizeddescription:)"
---

# error(withLocalizedDescription:)

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

## Declaration

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

## Parameters

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

## Return Value

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

## See Also

### Specifying Email Address Validity

- [success(withLocalizedDescription:)](mailkit/meaddressannotation/success(withlocalizeddescription:).md)
- [warning(withLocalizedDescription:)](mailkit/meaddressannotation/warning(withlocalizeddescription:).md)
