Click here to Skip to main content
15,908,768 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,


How to send mail and update database automatically without any event occur using c# web application.


Thanks in advance
Posted
Comments
[no name] 10-Oct-14 1:24am    
with out events we cant do any thing in dot net.could you please expain your exact requirement
nabinaya 10-Oct-14 1:28am    
Thanks for your reply...

am creating a ticketing system. i have to assign ticket to particular user after 15mins.
how can i do that??

1 solution

That's a big question to put up here - we don't write code for people - you also don't give us much to go on, for example, what email server/client are you using ?

One way would be - write a standalone exe to :-

a) connect to the database using (ADO ?)
b) generate (for example) a datatable of email addresses etc you wish to mail - have a blank/dummy column for 'status' - be sure to keep a key value in the datatable so you can update the database later
c) for every row in the datatable, generate & send and email in whichever client you're using
d) update the database using the key and status from the datatable

you could use a cursor instead of a datatable.

Then you just use a scheduler or such to run the exe - obviously you should have reporting, diagnostics etc in there as well
 
Share this answer
 

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