// Start is called before the first frame update void Start() { if (ip != null && port != 0) { client = new SendM(ip, port); } else { client = new SendM(); } }
protected void Button1_Click(object sender, EventArgs e) { SendM send = new SendM(); if (send.SendMessage(txtmailTo.Text, txtmailSubject.Text, txtmailContent.Text)) { Response.Write("<script>alert('发送成功!')</script>"); } else { Response.Write("<script>alert('发送失败!')</script>"); } }