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
}