---
title: handlerForMessageSecurity()
framework: mailkit
role: symbol
role_heading: Instance Method
path: mailkit/meextension/handlerformessagesecurity()
---

# handlerForMessageSecurity()

Returns an object that applies security measures such as encryption and digital signatures to messages.

## Declaration

```swift
optional func handlerForMessageSecurity() -> any MEMessageSecurityHandler
```

## Return Value

Return Value An object that encrypts, decrypts, and signs messages.
