我用的是vs2005,2.0.在winform下做个发送mail程序。怎么设置安全验证啊?
string from = textBox1.Text.Trim();

                string to = textBox2.Text.Trim();
                string subject = "Using the new SMTP client.";
                string body = @"Using this new feature, you can send an e-mail message from an application very easily.";
                MailMessage message = new MailMessage(from, to, subject, body);
                SmtpClient client = new SmtpClient(textBox3.Text.Trim());
                //client.EnableSsl = true;
                string[] split = from.Split(new Char[] { '@' });

                client.Credentials = new System.Net.NetworkCredential(split[0], textBox4.Text.Trim());
                client.Send(message);

我用了这些代码,但出错,请问这里存在什么问题?