要是smtp:
MailObj.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1");
MailObj.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", username);
MailObj.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", userpassword);
MailObj.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1");
MailObj.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", username);
MailObj.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", userpassword);
解决方案 »
- 一个c#菜鸟的问题,关于FileStream,望高手回答~~~
- 两个窗体间的传值问题
- 怎么解决在整个类当中传递变量的值呢?
- 求一个程序!---为了大家将来肯定会用到的
- 存储过程的如何传递日期型的参数?
- 急急急!!散100分求简单问题!中文XP+中文VS。NET编的界面(FORM)在英文xp下,中文字符不能完全显示出来
- WPF,请教x:Type标记扩展的用法
- Winform坦克大战,遇到一个多线程的问题,求助!!
- 利用c#如何实现程序的开机自动运行
- 如何将richtextbox中内容保存为html的格式?
- 又遇新难题,在C#中,如何限制在文本框中输入的只是汉字,其它的不可输入?
- 没法活了,怎么分析字符串啊?C#中有没有类似C++里面的scanf的东东啊!
http://www.cnblogs.com/mist/archive/2004/06/28/19299.aspx
SMTP:
//进行SMTP验证
if(ESmtp)
{
SendBuffer=new String[4];
SendBuffer[0]="EHLO " + mailserver + enter;
SendBuffer[1]="AUTH LOGIN" + enter;
SendBuffer[2]=Base64Encode(username) + enter;
SendBuffer[3]=Base64Encode(password) + enter;
if(!Dialog(SendBuffer,"SMTP服务器验证失败,请核对用户名和密码。"))
return false;
}
else
{
SendBufferstr="HELO " + mailserver + enter;
if(!Dialog(SendBufferstr,""))
return false;
}
另外服务器返回信息可以不处理,但这样做弊端很大。