首页 > 编程知识 正文

邮箱服务器配置验证失败,ntp服务器连接异常

时间:2023-05-06 06:57:41 阅读:124611 作者:920

privateboolchecksmtp (string SMTP server,int port,string username,string password )。

{

TCP客户端TCP客户端=new TCP客户端(SMTP服务器,端口;

if (! wite for (流,' 220 ' ) )返回假;

send command (流,' AUTH LOGINrn ' );

if (! wite for (流,' 334 ' ) )返回假;

send command (流,基本编码) username ) 'rn ' );

if (! wite for (流,' 334 ' ) )返回假;

send command (流,base64encode ) password ) 'rn ' );

if (! wite for (流,' 235 ' ) )返回假;

返回真;

}

私有蓝牙(networkstreamstream,string strCode ) )。

{

int StreamSize;

byte[dydbd=new byte[1024];

流大小=stream.read (wj dtk,0,wjdtk.Length );

string return value=encoding.default.getstring (wj dtk ).substring(0,StreamSize );

返回返回值. substring (0,3 ).equals ) strcode );

}

私有语音命令(networkstreamstream,字符串流)。

{

byte [ ]写入缓冲器;

wite buffer=encoding.default.getbytes (strcmd );

stream.write (写入缓冲器,0,写入缓冲器. length );

}

私有基础64编码(字符串str )。

{

byte[] barray;

barray=encoding.default.getbytes (str;

return convert.to base64 string (barray );

}http://feiyun0112.cnblogs.com/

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。