private void sendbtn_Click(object sender, System.EventArgs e)
{
jmail.MessageClass ojmail=new jmail.MessageClass();
ojmail.Charset="GB2312";
ojmail.Encoding="BASE64";
ojmail.ISOEncodeHeaders=false;
ojmail.Priority=Convert.ToByte(1);
ojmail.From="nulidewoniu@sina.com";
ojmail.FromName="Guming";
ojmail.Subject="This my first mail";
ojmail.MailServerUserName="nulidewoniu";
ojmail.MailServerPassWord="429518";
ojmail.AddRecipient("shchong@21cn.com","","");
ojmail.Body="Yeah,I make it now and I will do make farther progress from now on";
ojmail.Send("smtp.21cn.com",false); //提示此句错误:The message was undeliverable. All servers failed to receive the message
this.Label1.Text="Successfully";
ojmail.Close();
}
////////////////
下面的是堆栈跟踪:
[COMException (0x8000ffff): The message was undeliverable. All servers failed to receive the message]
jmail.MessageClass.Send(String mailServer, Boolean enque) +0
first.mailsending.Button1_Click(Object sender, EventArgs e) in c:\documents and settings\administrator\vswebcache\21bf9648d0af4cb\first\mailsending.aspx.cs:67
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277
各方高手,请指点了。。第一次发邮件。。
[此贴子已经被作者于2007-5-14 15:57:54编辑过]