I have installed phpmailer module and it works fine. https://drupal.org/project/phpmailer

But it doesn't seem to have the option for DKIM. How can I set DKIM for the mails sent by phpmailer?


1 Answer 1


Support for this it was requested over 2 years ago, and was moved to 7.x-3.x-dev branch, so it will not be possible in phpmailer for Drupal 6. The reason is that Drupal 6 will reach the end of its life soon, when Drupal 8 stable will be released. Thus, it will never be possible to set it in phpmailer for Drupal 6.

Anyway, enabling it at PHP level is a costly procedure. PHP is not really the best language for cryptography. As you can read here, configuring DKIM support at the MTA level makes all your server generated email for a given domain signed by default, and also off-loads the calculation burden to the system that's supposed to be optimized for it.

To make sure there is your MTA involved, you can use SMTP Authentication Support module. As you can see in it's issue queue it does not enable you to force DKIM from Drupal, but at least it ensures your mail server is sending mails, and does not interfere with mailserver's DKIM settings either.

  • Thank you Molot. OK so phpmailer module forces DKIM from Drupal but SMTP Authentication Support module doesn't. So if I switch to SMTP Authentication Support module I only need to set DKIM to the SMTP server. Am I correct?
    – Sona7
    Dec 20, 2013 at 7:17
  • @Sona7 phpmailer will force DKIM. Maybe. That are two key points, as this feature request is still active, accepted but not yet assigned to be done. For the "So if I switch to SMTP..." part, you are correct. You only need to ask your sysadmin to set DKIM on the SMTP server you would be using to send your mail. Drupal does not need to know about DKIM.
    – Mołot
    Dec 20, 2013 at 8:15
  • @Mołot Thank you for your clear explanation. I'll switch to SMTP Authentication module then.
    – Sona7
    Dec 20, 2013 at 8:40
  • @Sona7 First consult with your sysadmin, and show him the post from Stack I linked to be sure it can be done in your setup. We don't want you to waste your time if your SMTP server is not really ready to take that burden.
    – Mołot
    Dec 20, 2013 at 8:47
  • 1
    @Mołot Thank you. I'm actually thinking of using SMTP of Amazon SES as it seems to have also out-of-box DKIM support.docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html I'll try to set it up and see if it works.
    – Sona7
    Dec 20, 2013 at 9:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.