I'm working on entity form using the module "eform" in D8.

I would like it to send email when the user submits a form. It was done using some other modules rules and entity rules, but since "entity rules" is not released yet in D8, I couldn't find a way to send submission email. Is there any module to make it possible or should I create a custom module to do that?

2 Answers 2


I've asked the question multiple times. It appears that we need to wait for Rules. For the time-being, I'm using the built-in drupal contact form + contact_storage module for form. It's not the best, but it works.

  • The thing is I should use eForm..
    – PHG
    Commented Nov 2, 2015 at 15:58
  • Why? contact + contact_storage is entity forms. We (contact_storage maintainers) are very happy to receive patches to add additional features, that we eventually also want to get in core.
    – Berdir
    Commented Nov 4, 2015 at 21:42

I can see 2 ways to achieve it programmatically.

  1. Using Hooks.
  2. Using the Events system.

1) You can use "hook_ENTITY_TYPE_insert" in your module file. In this function/hook, you can trigger mail.

2) I believe using event system will be a better approach instead of using hooks. Currently, Drupal core doesn't provide any Events for entity(node) transactions like add/edit/delete. For this purpose, you can use "Entity Events" module. All steps are given module page. If you don't want to use the contributed module, you can create your own events to listen to entity-based transactions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.