How to send email to test takers after creating a test?

After creating a test when I am delivering it to test takers, I want an automatic email to be sent to each test taker. Now I can see that I have the option to enter the email id of each test taker but still when I save the test, no emails are being sent to respective test takers. What am I missing or what should I need to look at to address this? Would greatly appreciate your help. Thanks.


  • Hi robosandy,

    (I don't know why this topic and same question appears a second time...)

    As this is a very specific feature you want to add into TAO, you will have to develop a new extension for that latter.

    A link that may be useful to you.


  • Hi robosandy,
    I think the easiest way for you to do this is to create a new extension and register listener events to the DeliveryExecutionCreated Event. I've done something similar in a number of my extensions to run processes when Items get created or updated.

    I don't think there's an example wiki page on how to do this, but the general pattern is:
    1. Create a service class that extends the 'ConfigurableService' interface. This is where you're going to be catching the event and then creating your email. We can call it DeliveryNotificationService.
    2. Make a method named 'NotifyUser(DeliveryExecutionCreation $event)' to do the heavy lifting.
    3. In the __invoke() method of your InstallAction script, register this service and the listeners.
    * $this->registerService(DeliveryNotificationService::SERVICE_ID, new DeliveryNotificationService());
    * $this->registerEvent(DeliveryExecutionCreated::class, [DeliveryNotification::SERVICE_ID, 'NotifyUser']);

    The registerEvent method is used heavily throughout TAO, so there are a bunch of examples you can build off of. I think the harder part may be using a PHP module to create and send an email.

Sign In or Register to comment.

We use cookies on our website to support technical features that enhance your user experience. Cookie Policy Privacy Policy