Click here to Skip to main content
15,881,172 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I have a web application called taskmanagement system It calculated Delayed tasks and remaining tasks for every user and displayed.What I want is send email notification to the specific user that have delayed tasks.every day user logged in he should receive an email notification "u have delayed tasks" please give me an any link to study about this any help greatly appreciated.
Posted

This is a multi faceted question.

First of all, your web application cannot send emails at a set time, because your web app just sits there and waits for requests which are atomic ( self contained ). It has no state, no timers with which to fire an event.

Second, while your web app is on the web, it knows how to generate HTML for the web. Even if you wanted to send emails on request, it would still be irrelevant that your app is a web app, the answer to sending emails in C# is the same, no matter if it's a web app or a windows app.

This[^] is the first of many articles I found on this site, on how to send an email in C#. As for how you do it, I would do it inside a windows service, as this can run on your server, all the time, and fire based on a timer.

Here[^] is an article in creating a windows service.
 
Share this answer
 
Here [^] is an example of 'How to automatically send the email alerts to the users', using WebServies.!

Now what you can do is, fire query that gets the records who has delayed their task and for those users, use this service.
Hope this would help you !

Good Luck !
 
Share this answer
 
v2
Comments
Christian Graus 23-Jan-14 23:49pm    
Wow - both in one article. I searched for two articles for both halves !!

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