当前位置: 代码迷 >> 综合 >> 测试是否连接上 POP邮件服务器
  详细解决方案

测试是否连接上 POP邮件服务器

热度:77   发布时间:2024-01-21 23:17:46.0

 

设置JMAIL 的连接 用户名密码的时候 提前测试下设置是否可以连通

 

 

 try
            {
                /**/
                ///寤虹珛鏀堕偖浠跺?璞?

                jmail.POP3Class popMail = new POP3Class();
                popMail.Connect(this.textBox1.Text.Trim(), this.textBox2.Text.Trim(), this.textBox3.Text.Trim(), 110);
                popMail.Disconnect();
                popMail = null;
                System.Windows.Forms.MessageBox.Show("成功!");

            }
            catch
            {
                System.Windows.Forms.MessageBox.Show("失败!");
            }

 

  相关解决方案