I have created a webform to collect service contract information. The webform data includes several elements, including but not limited to: "contract number", "contract expiration date", "email address".
I need a custom module built to parse the webform "expiration date" field in this data once daily (via cron) and send an email reminder to the email address on each record based on the "lead time" date entered in the module settings. The email text should be customizable and allow for the inclusion of tokens to reflect the information mentioned above (contract number, expiration date, etc).
The only 2 settings that would be needed is a "number of days" and "cc email" (we will set this to our email address to be copied on all notification). For example, if the "number of days" setting was defined as "90", an email would be sent for any contracts expiring in 90 days from the date of the cron job running.
I would like simplicity over complexity here. I need a simple, reliable module that doesn't "re-invent the wheel", leveraging native Drupal architecture and functionality whenever possible to build the solution. Well documented code is required.