i have used a mail function. after inserting every record simultaneously from multiple PC.
I have set a timer which ticks for every 2 min. while it ticks it start to check the record and it send the mail. i have used background worker for that.in Bgdworker the mail fn will be called.
private void timer_Startsendingemail_Tick(object sender, EventArgs e)
{
if (!bgw_startsendingemail.IsBusy)
bgw_startsendingemail.RunWorkerAsync();
}
private void bgw_startsendingemail_DoWork(object sender, DoWorkEventArgs e)
{
sendingMail();
sendingsms();
}
in sendingmail()
, the datas fetch from database and send the mail based on email settings to all the inserted rec.
but the prob is the timer triggered for 2 min often , and the process will be working fine and nothing there in log file but sometime the mail is not received by the clients.how to fix the prob. how to find out where it is strucked...
its hard to find the problem. any idea over this?