serkan sendur 821 Postaholic Banned Featured Poster
System.Timers.Timer time; 
protected void Page_Load( object sender, EventArgs e) 
{
time =  new System.Timers.Timer (); 
time.Enabled = true ; 
time.Interval = 2000;
time.Elapsed += new System.Timers. ElapsedEventHandler(time_Elapsed); 
}
private void send() 
{
MailMessage mm = new MailMessage (); 
mm.IsBodyHtml = true ; 
mm.Body = "foo" ; 
mm.To.Add(new MailAddress ( foo@foo.com )); 
mm.To.Add(new MailAddress ( "foo@foo.com" )); 
mm.From =new MailAddress ( "foo@foo.com" ); 
SmtpClient sm = new SmtpClient (); 
sm.Host = foo@foo.com ; 
sm.Send(mm);
}
private void time_Elapsed( Object sender, EventArgs arg) 
{
System.Threading.Thread th = new System.Threading. Thread (send); 
th.Start();
}