Software Development/Scheduled Email
QUESTION: Hi Ramanan,
I want to send scheduled email in C# without using any event.
Some code that can send mail regularly based on some conditions or base on date/time.
ANSWER: Hi Karan,
If you want to send a scheduled email based on date/time just create a windows program and configure it in the scheduled tasks. The windows program will run each time based on your configuration in the scheduled tasks.
If you want to send an email based on some conditions, you need to implement logic in your windows program to check for the condition and then send email. Here also the windows program should be configured as a scheduled task.
---------- FOLLOW-UP ----------
QUESTION: Hey Ramanan,
Thanks for reply.
Sorry but I didn't get it. I am making invoices in my WebApplication (C#). I want to implement that in every 15 days clients with unpaid invoices get my mail that their payment is remaining. Now the query is how to implement this condition that checks everyday which invoices are Unpaid. And send mail to client without any click event or any other event.
Also provide reference link if possible.
Assume that in your Client or Order table there is a field which stores whether invoice is paid or unpaid.
You can develop a C# windows application which will have a method to find all Clients who have unpaid invoices and send them an email one by one.
You can then configure this windows applications to run everyday as a scheduled task on your Server.