mail function in windows application

Posted by Ranjana on Stack Overflow See other posts from Stack Overflow or by Ranjana
Published on 2010-05-28T10:48:28Z Indexed on 2010/05/28 10:51 UTC
Read the original article Hit count: 198

Filed under:
|
|
|
|

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() fn 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??????????/

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET