Search code examples
coldfusioncfmail

Is it possible to automatically send cfmail on a date


I built a form for a nonprofit where vendors can apply for a spot at a fundraiser. Once approved, an email is sent to them with a bill and a due date to mail in a check. It all works great! :)

What I'd like to do now is AUTOMATICALLY send them a reminder email if the due date has passed without payment.

Is it possible to trigger cfmail to do this in cold fusion? I've searched all over but can't find anything that even comes close.


Solution

  • The same code you develop that detects "Oh, it's been 10 days past the due date" (likely with a scheduled task to query for unpaid invoices where today-date > 10 or whatever), would send the email based on the results.

    You'll need a scheduled task to check at least once a day, and issue emails as appropriate. I'm not entirely sure how you would "know" the date has passed and they haven't paid... If that's with Coldfusion, send the email at detection time. Also log, somewhere, that you've sent the late notice, so you don't send it every day thereafter! You might want 30,60,90 emails, then some form of disabling of account afterwards.