Email not sending

Created on 30 June 2023, over 1 year ago
Updated 2 April 2024, 8 months ago

I have a simple model which sends a message to screen and an email when a node is updated. The message works fine but the email is not getting sent. I can send email using other tools/methods so I know the email system is working. I am using SMTP Authentication for this particular server.

I enabled logging on Drupal core and Debug level logging in ECA settings but I see no logs of value being generated. Here are the ECA log entries when the event is triggered.

admin 23:07:47 Rebuilt cache array for EcaStorage::loadByEvent().
- user (Entity user/1/admin)
admin 23:08:07 Lazy appliance check for event eca.content_entity.update regarding ECA ID eca_reminder resulted to apply.
- user (Entity user/1/admin)
admin 23:08:07 Loading ECA configurations for event eca.content_entity.update: eca_reminder.
- user (Entity user/1/admin)
admin 23:08:07 Check Update content entity (content_entity_update) from ECA Updated Content Message (eca_reminder) for event Drupal\eca_content\Event\ContentEntityUpdate.
- user (Entity user/1/admin)
admin 23:08:07 Start Update content entity (content_entity_update) from ECA Updated Content Message (eca_reminder) for event Drupal\eca_content\Event\ContentEntityUpdate.

Here are the system log entries

content 06/29/2023 - 23:08 eca_test: updated ECA Date Diff Test. admin View
eca 06/29/2023 - 23:08 Start Update content entity (content_entity_update)… admin
eca 06/29/2023 - 23:08 Check Update content entity (content_entity_update)… admin
eca 06/29/2023 - 23:08 Loading ECA configurations for event eca.content_entity… admin
eca 06/29/2023 - 23:08 Lazy appliance check for event eca.content_entity.… admin
eca 06/29/2023 - 23:07 Rebuilt cache array for EcaStorage::loadByEvent().-… admin

I just installed the Symfony Mailer module and got it working. It did not fix the email sending problem with ECA. I mapped the email send Action to the "Send email (Drupal Core) option. I did not see any reference to Symfony Mailer in the options so I assume this was correct.

The logs don't look any different other than we can see Symfony Mailer was being used:

admin 00:33:10 Lazy appliance check for event eca.content_entity.update regarding ECA ID symfony_emailer resulted to apply.
- user (Entity user/1/admin)
admin 00:33:10 Lazy appliance check for event eca.content_entity.update regarding ECA ID eca_reminder resulted to apply.
- user (Entity user/1/admin)
admin 00:33:10 Loading ECA configurations for event eca.content_entity.update: symfony_emailer, eca_reminder.
- user (Entity user/1/admin)
admin 00:33:10 Check Update content entity (content_entity_update) from ECA Symfony Emailer (symfony_emailer) for event Drupal\eca_content\Event\ContentEntityUpdate.
- user (Entity user/1/admin)
admin 00:33:10 Start Update content entity (content_entity_update) from ECA Symfony Emailer (symfony_emailer) for event Drupal\eca_content\Event\ContentEntityUpdate.
admin 00:33:10 Check Update content entity (content_entity_update) from ECA Updated Content Message (eca_reminder) for event Drupal\eca_content\Event\ContentEntityUpdate.
- user (Entity user/1/admin)
admin 00:33:10 Start Update content entity (content_entity_update) from ECA Updated Content Message (eca_reminder) for event Drupal\eca_content\Event\ContentEntityUpdate.

💬 Support request
Status

Closed: outdated

Version

1.1

Component

Miscellaneous

Created by

🇺🇸United States guymandude

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

Comments & Activities

  • Issue created by @guymandude
  • 🇩🇪Germany jurgenhaas Gottmadingen

    Currently, the only email action is available from Drupal core. There is some work/discussion over at the Symfonie Mailer project on how to provide an action such that e.g. ECA could use that, but that's not available yet. But there is some great work going on in the easy_email project, which provides a usable action after you've created an email template for that module.

    However, the simple email action from Drupal core should do as a start. From your logs, it looks as if the model is updating the entity as well? If so, this may run into a loop, as your event is about entity updates. So, when that model also updates the entity, then it triggers that same event again. To resolve that, you may be able to change the event to "Presave entity" maybe.

    If that doesn't help, please upload your exported model for further review.

  • 🇺🇸United States guymandude

    I gave the Presave method a shot but it did not make any difference.

    I installed Easy mail and created a simple template but that didn't fix problem either!

    I have attached 2 different models. Both models have actions to send mail using both core and Easy Mail:

    core-presave_email.tar.gz - This model uses Presave function.

    core-eca_reminder.tar.gz - This model uses Content Update function.

  • 🇩🇪Germany jurgenhaas Gottmadingen

    I've looked at the model and none of the object there has any sucessor. You can see that when looking in the column Successor, that's always No successor. You need to put your objects in a chain so that the model tells what should happen in which order.

  • Status changed to Postponed: needs info over 1 year ago
  • 🇩🇪Germany jurgenhaas Gottmadingen

    What's the status on this issue?

  • Status changed to Closed: outdated 8 months ago
  • 🇩🇪Germany jurgenhaas Gottmadingen
Production build 0.71.5 2024