Asp.Net 使用Jmail问题
如题:c#代码如下
程序代码:
protected void btn_sendMail_Click(object sender, EventArgs e) { string Subject = "Email Title"; string Body = "Hello Robin"; string aaa = SendMail.SendToMail("lipengdi163@", "33jaychou@", Subject, Body); Response.Write(aaa); }
程序代码:
public static string SendToMail(string from, string to, string subject, string body) { string Logs = string.Empty; try { Message jmail = new Message(); jmail.Charset = "UTF-8"; jmail.From = from; jmail.Silent = false; jmail.Logging = true; jmail.ContentType = "text/html"; jmail.AddRecipient(to, null, null); jmail.MailServerUserName = "lipengdi163"; jmail.MailServerPassWord = "*******"; //(确定自己密码填写正确) jmail.Subject = subject; jmail.HTMLBody = body; jmail.Send("smtp.", false); Logs = jmail.Log; } catch (Exception ex) { Logs = ex.Message; } return Logs; }
========================Jmail返回的信息====================
.execute()
{
Trying server mail:smtp.
<- 220 Anti-spam GT for Coremail System (163com[20121016])
-> EHLO ZC008-HOJO1KLHN
<- 250-mail
250-PIPELINING
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-coremail 1Uxr2xKj7kG0xkI17xGrU7I0s8FY2U3Uj8Cz28x1UUUUU7Ic2I0Y2UFcCKDcUCa0xDrUUUUj
250-STARTTLS
250 8BITMIME
-> AUTH LOGIN
Sending authentication data..
-> MAIL FROM:<lipengdi163@
<- 250 Mail OK
-> RCPT TO:33jaychou@
<- 250 Mail OK
-> DATA
<- 354 End data with <CR><LF>.<CR><LF>
Sending headers...
Sending body...
Message sent
<- 250 Mail OK queued as smtp12,EMCowEDZ2khr4yZRzYsABg--.433S2 1361503087
0 of 1 servers failed
}
网上找到的方法都试过了,还是不知道怎么解决,求高手帮忙看看,谢谢 !
[ 本帖最后由 one_june 于 2013-2-22 11:18 编辑 ]