Daily report to email

By Toledoh - October 18, 2016

Hi Guys,

No rush on this one - just hoping to get some direction.

I want to create a plugin that runs daily, and sends an email to a chef on how many booking / meals etc there are for the kitchen the next day.

I've got a report viewable via a URL that lists each booking for the queried date range, then totals the numbers at the end.  I want to send those total in an email.

How would I go about setting that up?

Cheers,

Tim (toledoh.com.au)

By ross - October 31, 2016

Hi Tim

What I would do is setup a custom script using the cron system in CMS Builder. The script can be scheduled to run once a day.

The first step is to take the script you already created and add the email components to it.

This will involve setting up an email template and then using the function sendMessage().

Are you familiar with our sendMessage() function and how to have it use an email template?

After that, we can look at how to have this script run automatically via cron.

Does that all make sense?

Let me know any questions.

Thanks.

-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/