跪请高手乱入,asp+Jmail发邮件的问题!
小弟写了一个发邮件的程序
jmail.Message Jmail = new jmail.Message();
DateTime t = DateTime.Now;
String Subject = " From EMail .net";
String body = "你好科學12:15";
String FromEmail = "xpandcook@163.com";
String ToEmail = "xpandcook@163.com";
// Jmail.Silent = true;
Jmail.Logging = true;
Jmail.Charset = "Big5";
// Jmail.ContentType = "text/html";
Jmail.AddRecipient(ToEmail, "", "");
Jmail.From = FromEmail;
Jmail.MailServerUserName = "xpandcook";
Jmail.MailServerPassWord = "*****";
Jmail.Subject = Subject;
Jmail.AddAttachment("c:\\test.jpg", true, null);
Jmail.Body = body + t.ToString();
try
{
Jmail.Send("stmp.163.com", false);
Jmail.Close();
this.Response.Write("郵件發送成功!");
}
catch (System.Exception e1)
{
Jmail.Close();
this.Response.Write(e1.ToString());
}
老是弹出错误
System.Runtime.InteropServices.COMException (0x8000FFFF): The message was undeliverable. All servers failed to receive the message at jmail.MessageClass.Send(String mailServer, Boolean enque) at _Default.Button1_Click(Object sender, EventArgs e) in c:\Documents and Settings\Administrator\WebSite2\Default.aspx.cs:line 65
都两天了,小弟崩溃了,恳请高人指点!