Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
how to use timer tick event for sending mail on particular date
anjumathi kumar
Sep 14 2011 1:26 AM
1.6k
Reply
public void emailsenddatetimeevent(DateTime emailsenddate)
{
System.Timers.Timer time = new System.Timers.Timer();
string TodayDatetime = DateTime.Now.ToLongTimeString();
time.Start();
time.Interval = 600000;
//double interval = 0;
//if (emailsenddate > DateTime.Now)
//{
// TimeSpan span = emailsenddate - DateTime.Now;
// interval = span.TotalMilliseconds;
//}
if (DateTime.Now == emailsenddate)
emailSend();
}
Hi this is my function for sending mail on particular date..till that i want to check every time using timer..i dono the coding for exactly...i tried the code that oly posted..i have my date in emaildate in the date my emailsend function want to send mail anybody know this? please reply as soon as possible..say what i want to add and how to change
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Oracle data source with an MVC 2.0 project
Error in creating index with smo