Author: shankbond | Posted on: 11/17/2009 8:42:46 AM | Views : 373

Hi,
I am developing a code to send mails asynchronously, I have also written the code with the help of google  the code also works perfectly, but Ideally the asynchronous methods are called and forgotten, but my code still waits for the execution of sending mail?
I am giving You the code:
protected void Button_Click(object sender, EventArgs e) { SmtpClient client = new SmtpClient(); MailMessage message = new MailMessage(); client.Port = Convert.ToInt16(TextBoxport.Text); client.Host = TextBoxserver.Text; client.UseDefaultCredentials = true; client.Credentials = new System.Net.NetworkCredential(TextBoxusername.Text, TextBoxpassword.Text); client.EnableSsl = true; message = new MailMessage(new MailAddress(TextBox ...

Go to the complete details ...