Download Mail plugin pre-sales question

5 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: August 26   (RSS)

By ht1080z - August 24 - edited: August 24


I hope everybody had a wonderful summer!

A quick question about the Download Mail plugin:

Can I link emails to another table (example: "Applications" that users registered on the website and with attachments sent via emails to a selected and connected-with Download Mail plugin)?
Do I need to put some unique variable to the email subject so I can link each specific email with the related records?

Any help would be much appreciated,

By ht1080z - August 26

Hi Daniel,

Thank you for your reply. Please provide me some guidance about where to start and look at this first better.

Thanks again,

By daniel - August 26

Hi Karls,

The way I'd approach this is to create a plugin that runs a regular background task to look for downloaded mail and process any new items. To set up a background task, you would use theĀ addCronJob() function, which would look something like this:

addCronJob('your_function_name_here', "Description of task", '* * * * * *');

This function will add a task to CMSB's Background Tasks, and will execute a function you specify in the first parameter at the interval specified in the 3rd parameter (learn more about cron interval formatting here: Note that you'll also need to enable CMSB Background Tasks by setting up a cron job on your server - instructions for this can be found on the Background Tasks page, under Admin Menu.

Once you have the task running, you'll want to use the function to check for new downloaded mail records (in table "_incoming_mail" by default), determine if they need to be linked to another table, and update any necessary fields. The Incoming Mail table comes by default with a "processed" field, which you can update to track which mail records have already been checked by your function.

Let me know if you have any other questions!


Technical Lead

By ht1080z - August 26

Hi Daniel,

Thank you for your help. I'll definitely take a deep dive on this.