I am getting the following error during update_cron runs
Error sending email (from abc@axelerant.com to abc@axelerant.com with reply-to not set).
Traced the bug to the following code.
$message = \Drupal::service('plugin.manager.mail')->mail('update', 'status_notify', $target, $target_langcode, $params);
in update.fetch.inc in Core.
Planning to add a patch for this shortly.
Adding the stack trace for this.
#24 core/lib/Drupal/Core/Mail/MailManager.php(312): doMail
#23 core/lib/Drupal/Core/Mail/MailManager.php(179): Drupal\Core\Mail\{closure}
#22 core/lib/Drupal/Core/Render/Renderer.php(582): executeInRenderContext
#21 core/lib/Drupal/Core/Mail/MailManager.php(180): mail
#20 core/modules/update/update.fetch.inc(41): _update_cron_notify
#19 core/modules/update/update.module(281): update_cron
#18 [Anonymous function](0): call_user_func_array
#17 core/lib/Drupal/Core/Extension/ModuleHandler.php(392): invoke
#16 core/lib/Drupal/Core/Cron.php(236): invokeCronHandlers
#15 core/lib/Drupal/Core/Cron.php(134): run
#14 core/lib/Drupal/Core/ProxyClass/Cron.php(75): run
#13 /app/vendor/drush/drush/src/Drupal/Commands/core/DrupalCommands.php(59): cron
#12 /app/vendor/drush/drush/src/Drupal/Commands/core/DrupalCommands.php(0): call_user_func_array
#11 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(257): runCommandCallback
#10 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): validateRunAndAlter
#9 /app/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): process
#8 /app/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(302): execute
#7 /app/vendor/symfony/console/Command/Command.php(255): run
#6 /app/vendor/symfony/console/Application.php(981): doRunCommand
#5 /app/vendor/symfony/console/Application.php(254): doRun
#4 /app/vendor/symfony/console/Application.php(147): run
#3 /app/vendor/drush/drush/src/Runtime/Runtime.php(118): doRun
#2 /app/vendor/drush/drush/src/Runtime/Runtime.php(49): run
#1 /app/vendor/drush/drush/drush.php(72): require
#0 /app/vendor/drush/drush/drush(4): null
I am not able to reproduce this locally. This is coming up frequently in a Sentry IO instance and only occurs on update_cron when sending the notification to the registered email address.
PHP version is 7.3.9
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | 3090685-17.patch | 583 bytes | neelam_wadhwani |
| #16 | interdiff_2-16.txt | 602 bytes | swatichouhan012 |
| #16 | 3090685-16.patch | 0 bytes | swatichouhan012 |
| #2 | update-cron-error-sending-email-reply-to-not-set-3090685.patch | 750 bytes | binnythomas |
Comments
Comment #2
binnythomas commentedAdding the patch with more parameters to the method call.
Comment #3
binnythomas commentedComment #4
binnythomas commentedComment #5
Dirst commentedIm looking on it during the amstrerdam contrib day. I've changed version to 8.9.x because I dont see how it is related to 8.7.8
Comment #6
Dirst commentedComment #7
Dirst commentedSorry, I wasn't able to reproduce it. Not on 8.7 or 8.9. Can you provide more information please - steps to reproduce?
Comment #8
sutharsan commentedTagging for issue summary update for Steps to reproduce. I strongly encourage to use the issue summary template (https://www.drupal.org/node/1155816), that helps you providing the most commonly requested subjects.
Further I noticed in the interface definition (\Drupal\Core\Mail\MailManagerInterface::mail) that the seventh parameter, which you set to true, is true by default. So in theory, setting it to true does not make a difference. Do you use a non-code mail handler service?
Comment #9
binnythomas commentedAdded issue summary and error stack. FYI, there is a similar issue related to this.
https://www.drupal.org/project/admin_content_notification/issues/3016454
Comment #10
binnythomas commentedComment #11
binnythomas commentedComment #12
sutharsan commented@binnythomas, thanks for the update. But _do_ use the issue summary template, it makes it easier to scan the summary, especially when it grows as it currently does.
Steps to reproduce are vital. If you can not reproduce the issue, it is very hard to convince others to make a change. The issue may also need a test to prove the failing situation, that surely needs a reproducable case.
For related issues, there is a separate field in this issue ("Related issues"). It also provides a back link from the related issue to this one.
Comment #13
sutharsan commentedComment #14
sivaji_ganesh_jojodae commentedNot sure how to reproduce the issue.
Comment #15
darrenwh commentedYou don't need to add these extra parameters, they are the defaults on the method, ie: NULL, TRUE)
Comment #16
swatichouhan012 commentedRemoved extra parameters.
Comment #17
neelam_wadhwani commentedKindly review update patch.
Comment #19
dwwThere's nothing left of the patch except whitespace errors.
Multiple folks have asked for steps to reproduce, and there are none.
Others have tried to reproduce and been unable.
So I'm going to close this. If anyone is experiencing this and has reliable steps to reproduce, please comment. Otherwise, nothing else we can do here.
Thanks/sorry,
-Derek
Comment #20
hermann77 commentedI had the same issue and want to give an advice:
go to
admin/config/system/mailsystem
and check the settings for
\Drupal\Core\Mail\MailInterface::mail()In 'MODULE-SPECIFIC CONFIGURATION' you can choose a module specific sender plugin. For 'Update Manager' as well. In my case 'Default PHP mailer' as Plugin works properly.
Also check, if the receiver email address is correct:
admin/reports/updates/settings
Thanks.