• I set a DKIM configuration with this code:

    function phpmailer_dkim( $phpmailer ) {
      $phpmailer->DKIM_domain   = 'mydomain.com';
      $phpmailer->DKIM_selector = 'phpmailer';
      $phpmailer->DKIM_private  = '/path/to/my/private.key';
      $phpmailer->DKIM_private_string = ''; // string takes precedent over line above
      $phpmailer->DKIM_passphrase = ''; // if key encrypted
      $phpmailer->DKIM_identity = $phpmailer->From;
    }
    add_action( 'phpmailer_init', 'phpmailer_dkim' );

    And the email is correctly signed when I use the Send Test Email tool, but if I use Queue Test Email the email is not signed (there is no DKIM signature).

    Why the PHPMailer DKIM configuration is lost when using the queue? How can I fix this?

    Thanks!

    • This topic was modified 4 years, 2 months ago by etatus.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter etatus

    (@etatus)

    Ok, as I imagine, when the queue is used, a new instance of phpmailer is created, so all previous configuration is missing.

    See: gd-mail-queue/core/objects/core.email.php, function build_phpmailer()

    If I set the DKIM configuration after that, the signature is correctly generated.

    Is there a more elegant way to do this?

    Thanks!

    Plugin Author Milan Petrovic

    (@gdragon)

    This will be supported in the next major update (3.9 or 4.0) in late October.

    Thread Starter etatus

    (@etatus)

    That’s good news! Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘DKIM config is missing when sending through queue’ is closed to new replies.