Send mail to a MAMS user when a task is due?

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
webform
Power Poster
Power Poster
Posts: 489
Joined: Sat Nov 25, 2006 3:39 pm
Location: Copenhagen, Denmark

Send mail to a MAMS user when a task is due?

Post by webform »

I wonder if it is somehow possible to send mail to a MAMS user when a task is due?

I imagine using a combination of MAMS and LISE (or maybe Khronos) to create task lists with due dates set. And then possibly with a cron job to trigger the sending of emails when a task is due.

Right now I don't have any good ideas how the task can be solved. Or maybe a completely different solution I should look at?
Suggestions are very welcome.

The intended solution briefly outlined:
  • A MAMS user creates a task for himself or another MAMS user and sets an interval for how often the given task must be performed.
  • When the due date is reached (e.g. every 14 days), an email is automatically sent to the associated MAMS user reminding them that the task must be completed.
  • The idea is that it is all handled in a MAMS protected frontend (It is a form of internally hosted solution/intranet for work colleagues)
  • All MAMS users (work colleagues) and in particular the Team leader can continuously monitor whether the tasks are carried out and when they were carried out.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1961
Joined: Mon Jan 29, 2007 4:47 pm

Re: Send mail to a MAMS user when a task is due?

Post by Jo Morg »

Perfectly possible! There are a few things to take into consideration though:
  • what will be your clock? (cronjob recommended);
  • where will a temporary list of tasks be kept along with the details needed to manage them? (LISE recommended);
  • should there be an historic list of tasks whether complete or not and their status? (again LISE recommended if yes);
Whether you want to use Khronos or not will be more of a presentation choice, but imo the combo of MAMS and LISE instances will do the job perfectly and allow for more versatility. You'll need some PHP knowledge, use of UDTs, core events, and both MAMS and LISE APIs
These are just a few pointers but doable, for sure.
If you need more technical details you can PM me, and I'll be happy to give some assistance, although I have less and less free time atm. ::)
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
webform
Power Poster
Power Poster
Posts: 489
Joined: Sat Nov 25, 2006 3:39 pm
Location: Copenhagen, Denmark

Re: Send mail to a MAMS user when a task is due?

Post by webform »

Many thanks for the feedback.

I am glad to hear that it is possible. I was afraid that I would have to use a different solution than CMSMS and LISE.

The idea is to use LISE for the task and create a few different LISE instances (LISEServers + LISETaskLog).

It is basically a list of servers in our department, where the Team Leader can create a server in a LISE Instance (LISEServers) and set how often it must be updated and select a MAMS User who will be responsible for the task.

The selected user must then receive an email when it is time to carry out the update, after which the user creates a log entry (LISETaskLog), where he notes when the task has been carried out and a note about what has been done.
The task log will save the historical data, so you can always go back and see what has happened on a server.

I now have a good handle on creating the various LISE Instances and Front End forms and how to tie them together with LISE API and UDT. But it is the email handling and the cron job where I am completely blank. I had thought that I would have to use UDT and events to make it work, I just don't know how yet.
But now that I know it should be possible, I will go into the thinking box and think more about how.

Thanks for the suggestions. I will probably ask when I get a little further.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1961
Joined: Mon Jan 29, 2007 4:47 pm

Re: Send mail to a MAMS user when a task is due?

Post by Jo Morg »

An additional tip:

Create a template that is basically an empty template, pretty much just

Code: Select all

{process_pagedata}
{content}
use it on a hidden page (not shown on any menus) and use its link to feed a server cron job.
On that page content put the UDT you will use to process the cron job.
You can actually use any template you want, if you want to keep it consistent with the rest of the site but remove all the noise and anything it may impact a time critical use. Maybe a link home just in case someone accidentally finds the page.
That UDT will be the point where you'd compare dates and process a list of active tasks, send emails, etc.

Events will be used to process added tasks (on create, on edit, on delete, etc)... :)... for LISE and perhaps MAMS...
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
webform
Power Poster
Power Poster
Posts: 489
Joined: Sat Nov 25, 2006 3:39 pm
Location: Copenhagen, Denmark

Re: Send mail to a MAMS user when a task is due?

Post by webform »

Great! Thanks for the tip.

I will gradually start building the solution and see how far I can get before I have to draw on the forum's help again.
Post Reply

Return to “The Lounge”