看看你的邮件地址和smtp服务器的地址都对吗?

解决方案 »

  1.   

    private void btn_send_Click(object sender, System.EventArgs e)//发送
    {
    MailMessage Message=new MailMessage();   Message.From=sender_ddl.SelectedItem.Value+"@tpco.com.cn";
    Message.To=TextBox1.Text;
    Message.Subject=TextBox3.Text;
    Message.Body=TextBox2.Text;
    Message.BodyFormat=MailFormat.Text;
    Message.Priority=MailPriority.Low;
    string[]  ServerPool = new string[2];
    ServerPool[0]="dns.tpco.com.cn";
    //ServerPool[1]="smtp.163.com";
    SmtpMail.SmtpServer=ServerPool[0];
    try
    {
     SmtpMail.Send(Message);
     MessageBox.Show("成功发送到 "+ TextBox1.Text, "C#邮件",MessageBoxButtons.OK, MessageBoxIcon.Information,MessageBoxDefaultButton.Button1,MessageBoxOptions.ServiceNotification); 
    }
    catch{
     Response.Write("<script language='javascript'>alert('邮件发送失败!')</script>");
    }
           
    }
      

  2.   

    属于服务器没找到的错误,确认你的SMTP服务器是否可以使用。