Setting up DomainKeys/DKIM in a PHP-based SMTP client

I found a modified version of the DKIM from (you can download it via If you have already implemented DKIM and just need to make it work with SMP mail then all you need from this is the dkim.php file which, as the blog says, is slightly modified to handle headers passed as an array. In my code, I have named it dkimNEW.php.