Twake mails aren't sent


I’m having an issue with email. I configured SMTP parameters in Parameters.php, but mails aren’t sent.

I checked queues with docker-compose exec rabbitmq rabbitmqctl list_queues name messages messages_ready state, everything seems fine (messages in mail queue listed and ready).

I also checked docker-compose logs, and I haven’t seen even a hint of an error.

Any idea about that ? :thinking:

Thanks ! :slight_smile:

to check the errors try this procedure:

  1. sudo docker-compose exec php php bin/console twake:mails_queue (will run for 1 minute)
  2. Add a secondary email / invite someone by email

(retry adding secondary mail multiple time to fill up the queue to be sure to intercept the error as if an error occur on a mail task it is delayed for 1 minute and there is an other consumer running in background)


Thanks ! I tried it, got this error :

Fatal error: Uncaught Swift_SwiftException: Unable to load DKIM Private Key [error:0607A082:digital envelope routines:EVP_CIPHER_CTX_ set_key_length:invalid key length] in /twake-core/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DKIMSigner.php on line 675

Swift_SwiftException: Unable to load DKIM Private Key [error:0607A082:digital envelope routines:EVP_CIPHER_CTX_set_key_length:invalid  key length] in /twake-core/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DKIMSigner.php on line 675

I didn’t have configured dkim, and thought the block in Parameters.php could be left empty. Then I commented it, executed docker-compose restart, and retried, but the issue still occurs :thinking:

Here is the complete stacktrace :

Call Stack:
    0.0002     350744   1. {main}() /twake-core/bin/console:0
    0.0669    2966624   2. App\App->runCli() /twake-core/bin/console:9
    0.0669    2967080   3. Common\CommandsManager->run() /twake-core/app/App.php:134
    0.0669    2968792   4. Common\CommandsManager->execute() /twake-core/app/Common/CommandsManager.php:27
    0.0677    2985824   5. Twake\Core\Command\MailsQueueCommand->executeFromManager() /twake-core/app/Common/CommandsManager.php:46
    0.0677    2985824   6. Twake\Core\Command\MailsQueueCommand->execute() /twake-core/app/Common/Commands/ContainerAwareCommand.php: 27
   21.4116    8465976   7. Twake\Core\Services\TwakeMailer->sendInternal() /twake-core/src/Twake/Core/Command/MailsQueueCommand.php:6 6
   21.4298    9283392   8. Twake\Core\Services\TwakeMailer->sendHtml() /twake-core/src/Twake/Core/Services/TwakeMailer.php:95
   21.4834   11078552   9. Swift_Mailer->send() /twake-core/src/Twake/Core/Services/TwakeMailer.php:151
   21.8575   11103232  10. Swift_SmtpTransport->send() /twake-core/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php:71
   21.8583   11111592  11. Swift_SmtpTransport->sendTo() /twake-core/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Abstr actSmtpTransport.php:206
   21.8583   11111968  12. Swift_SmtpTransport->doMailTransaction() /twake-core/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Tran sport/AbstractSmtpTransport.php:516
   21.9756   11111968  13. Swift_SmtpTransport->streamMessage() /twake-core/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transpor t/AbstractSmtpTransport.php:500
   21.9761   11118448  14. Swift_Message->toByteStream() /twake-core/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Abstr actSmtpTransport.php:398
   21.9779   11122280  15. Swift_Message->doSign() /twake-core/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Message.php:169
   22.0229   11125736  16. Swift_Signers_DKIMSigner->addSignature() /twake-core/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mess age.php:203
   22.0234   11128096  17. Swift_Signers_DKIMSigner->getEncryptedHash() /twake-core/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ Signers/DKIMSigner.php:551

Do you want that I push an issue on github ?


Yes an issue on github would be appropriate, it’s on me this time we did not implemented the case where DKIM is not defined!

Alright, I will push it then :thinking:

Thanks for your time, sincerly ! :clap:


Here we are ! :grin:

For reference :