I have a page that lists programs people can donate to for a non-profit. This list is updated from a separate database. The current flow takes the entries offline via using Solspace Import to mark them closed, then a second import will edit or add new entries. Those that are still active are then marked open and the list is once again live and ready for people to use.

However, things can and do go wrong. We would not want this list to be blank. I currently have a notice in the no_results tag that asks the user to email the admin if they see that message. A preferred method would be to have the system send an email if the no_results tag is displayed.

Any ideas how to implement this or something similar? Anything that lets us know the list is blank will work.

2 Answers 2


Take a look at Email-from-Template.

This plugin sends its tag contents in an email (with or without echoing that content back to the template).

By placing it in a template, and inside a conditional if necessary, you can trigger an email to be sent as needed.

Example Usage:

{exp:email_from_template to="[email protected]" from="[email protected]" subject="Hello!" echo="off"}

   This tag content is being viewed at {uri_string}.
   Sending notification to {to}.


I did a quick test and if you wrap something similar to the above example in a no_results conditional it works perfectly. Should be just what you need to send an email when there are no results.


There's an addon Encaf 404 Email which is pretty close to what you need. It is triggered on a 404 error. If you know php perhaps you could use that add-on as a guide on creating your own plugin to achieve what you need.

Another possibility is Postmaster, though I'm not sure that it will do what you need either.

  • Postmaster v1.2 can send an email using the channel entries loop, but I have never done it only for no_results. V1.2 is due out in the next week, but I am happy to give the beta build to anyone with a valid license. Dec 10, 2012 at 18:22
  • Will Postmaster be able to do what I need? ie user goes to page. They get the 'no_results' message that says the admin has been notified. Postmaster sends an email to the admins.
    – Doug
    Dec 10, 2012 at 18:32

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.