"Exception: Process timed out" during sending mail in C# windows .net
<p>when i am sending mail i am getting an exception "Timed out". How will i solve this ? My code is below..
  // To
                MailMessage sendmail = new MailMessage();</p>

<pre><code>            for (int k = 0; k &lt; globaldecl.application1.filecount; k++)
            {
                string fil = attachfile[k];
                Attachment data = new Attachment(fil); // Attaching multiples  files 

                sendmail.Attachments.Add(data);
            }

            sendmail.To.Add(sendfrom);
            sendmail.IsBodyHtml = true;
            // From
            MailAddress mailAddress = new MailAddress(sendfrom, textmessagefromvalue.Text);

            sendmail.From = mailAddress;

            // Subject and Body

            if(textBoxsubject.Text != "")
                sendmail.Subject = textBoxsubject.Text;



            if(textBoxadcc.Text!="")
                sendmail.CC.Add(textBoxadcc.Text);
            if(textBoxaddbcc.Text != "")
                sendmail.Bcc.Add(textBoxaddbcc.Text);


            sendmail.Body = MailText.Text;
            sendmail.ReplyTo = mailAddress;


            // Init SmtpClient and send
           SmtpClient smtpClient = new SmtpClient(sendfromsmtp, sendfromport);

            System.Net.NetworkCredential credentials = new System.Net.NetworkCredential(sendfrom,sendfrompassword);
            smtpClient.Credentials = credentials;


            smtpClient.Send(sendmail);
</code></pre>

<p>and i am getting exception "The Operation has Timed Out".</p>

<p>Thanks</p>
