Click here to Skip to main content
15,897,704 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I am implementing a website- CRM using asp.net(VB). There is a requirement that the system should send emails daily for some particular days to employees. This must be automated as a schedule. How can I implement this ? Provide the necessary code if possible. Thanks
Posted

1 solution

I can provide you one quick way.
I believe you must be having a table where you store the recipients details and email sending time(I mean when you want to send the emails). Create ones console application which will fetch the rows from the table by checking the Email sending time. Then you can send he emails one by one. After one successful mail sent or failure on sending emails, do change the row status on the table. That way you can restrict duplicate email sending. Once the application is ready, you can put it on the server and trigger it from the windows scheduler. You can plan set the reputation times as needed.

The same work you can do using a windows service as well, but I like the console to be triggered from the win scheduler.
 
Share this answer
 
Comments
Member 11148158 18-Oct-14 6:19am    
Well that looks like the solution but I didn't get you coz I know nothing about this Windows Service.
NaibedyaKar 18-Oct-14 13:30pm    
Here is a link which you can follow to create the service.
http://www.codeproject.com/Articles/3990/Simple-Windows-Service-Sample

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900