Click here to Skip to main content
15,906,569 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi there.
I searched in every site for this issue, but i could not find any thing as well.

Think about this: I want to post a mail at specific time, like 21 Sep 2012 in asp.net.

Some user helped me to use windows service, but this one need a dedicated host. Some of the other user took me use web service and set timer for that, but when windows shutdown, every trigger is reset. What can i do for this issue?

Thanks for your answers, and excuse me for my bad English language.
Posted
Comments
Pong D. Panda 12-Apr-11 22:34pm    
You can use a background process like windows service and run it on your dedicated host. Regarding the mails to send on a specific date, you can either save the schedule on a file or on a database in which the process will check every seconds (depends on your timer configuration).

1 solution

in asp.net you insert the global.asax file and
Application_Start event you check date and write code for send mail.
 
Share this answer
 
Comments
texxxaz 12-Apr-11 7:23am    
it just run for first start of site. And so i have to use Session_Start. But when it should be post more than 10 mail, when Session_End call. It be end and dont be continue.
Thanks for your help.
Rakesh From Patna 12-Apr-11 7:41am    
say in details, because i not understand.
but if you want to your application is send email lifetime you
you use Application_Start event and inside you add
TimeSpan class (or other timer class which ticks event work in your given time and check the date and send the email

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