---
title: How to Generate a Domain’s DKIM Key
description: "Use the following function, which works for CyberPanel, InterWorx, Mailcow, Mailu, Poste, Ploi, 20i/StackCP and WildDuck integrations only, to generate a domain's DKIM key and ensure that you are using WP Email Manager V 1.0.12+. Please note that this will…"
url: "https://wpemailmanager.com/docs/how-to-generate-a-domains-dkim-key/"
updated: "2023-05-17"
category: Developers
---

# How to Generate a Domain’s DKIM Key

Use the following function, which works for CyberPanel, InterWorx, Mailcow, Mailu, Poste, Ploi, 20i/StackCP and WildDuck integrations only, to generate a domain's DKIM key and ensure that you are using WP Email Manager V 1.0.12+. Please note that this will only work if the domain does not have an existing DKIM key.

## Function Usage

```
/**
 * Generate a DKIM Key
 */
$dkim_generated = wp_email_manager_generate_dkim_key('domain.com' );
if( $dkim_generated )
{
	// Do Something
}
```
