Sends emails and retries failures not working for custom module emails

Created on 14 March 2025, 2 months ago

After installing and enabling Symfony Mailer Queue, I did:

  1. I updated General Cron Settings (I use Ultimate Cron): Override cron queue processing=Yes
  2. I changed Mailer policy: added 'Queue sending' to '*All* *All*'
  3. I used Mailer Test (see Capture 1)
  4. I ran cron 'Queue: Sends emails and retries failures' (see Capture 2)

And it works!

  1. I generated a bunch of emails with one custom module cron. The 'queue' table of my database is populated
  2. I ran cron 'Queue: Sends emails and retries failures'

And it doesn't work!
The log of the cron job says:
Error: Unknown named parameter $__disable_customize__ in Drupal\symfony_mailer\EmailFactory->initEmail() (line 92 of /var/www/html/web/modules/contrib/symfony_mailer/src/EmailFactory.php).

🐛 Bug report
Status

Active

Version

1.1

Component

Code

Created by

đŸ‡Ģ🇷France gbmapo

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @gbmapo
  • 🇩đŸ‡ĒGermany simonbaese Berlin

    Thank you for the report. This is probably related to 🐛 Remove '__disable_customize__' parameters while queuing legacy emails Active . I will check it out soon once client work is less busy.

  • đŸ‡Ģ🇷France gbmapo

    I did another try after converting all my custom modules to use Level 3 Native implementation of Drupal Symfony Mailer.
    Everything works fine when I don't use Symfony Mailer Queue.

    When I use it, it doesn't â˜šī¸
    The log of the cron job (Queue: Sends emails and retries failures) says:

    Warning: Undefined array key 0 in Drupal\amap\Plugin\EmailBuilder\EmailBuilder->createParams() (line 37 of /var/www/html/web/modules/custom/amap/src/Plugin/EmailBuilder/EmailBuilder.php) @backtrace_string.
    Warning: Undefined array key 1 in Drupal\amap\Plugin\EmailBuilder\EmailBuilder->createParams() (line 45 of /var/www/html/web/modules/custom/amap/src/Plugin/EmailBuilder/EmailBuilder.php) @backtrace_string.
    TypeError: Drupal\symfony_mailer\MailerHelper::parseAddress(): Argument #1 ($encoded) must be of type string, null given, called in /var/www/html/web/modules/custom/amap/src/Plugin/EmailBuilder/EmailBuilder.php on line 72 in Drupal\symfony_mailer\MailerHelper->parseAddress() (line 101 of /var/www/html/web/modules/contrib/symfony_mailer/src/MailerHelper.php).
    

    The good thing is that the correct EmailBuilder is called.
    The problem is that the parameters of the email aren't sent from the queue.
    Sorry, I couldn't debug further...

Production build 0.71.5 2024