private void button5_Click(object sender, EventArgs e) { this.Hide(); Userform obj = new Userform(); obj.Show(); }
private void button1_Click(object sender, EventArgs e) { login = new NetworkCredential("tarun.ambili123", "achan123"); client = new SmtpClient("smtp.gmail.com"); client.Port = Convert.ToInt32("587"); client.EnableSsl = checkBox1.Checked; client.Credentials = login; msg = new MailMessage { From = new MailAddress("*****@*****.**") }; msg.To.Add(new MailAddress(textBox1.Text)); msg.Subject = "Registartion Complete"; msg.Body = "Welcome to CAR WORLD"; msg.BodyEncoding = Encoding.UTF8; msg.IsBodyHtml = true; msg.Priority = MailPriority.Normal; msg.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure; client.SendCompleted += new SendCompletedEventHandler(SendCompletedCallback); string userstate = "Sending..."; client.SendAsync(msg, userstate); Userform obj = new Userform(); this.Hide(); obj.Show(); }