标题:Asp.Net 使用Jmail问题
只看楼主
one_june
Rank: 4
等 级:业余侠客
帖 子:139
专家分:212
注 册:2010-3-14
结帖率:86.96%
已结贴  问题点数:20 回复次数:2 
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 编辑 ]
2013-02-22 11:15
yms123
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
得分:20 
用不惯jmail
推荐几篇用c#自己的组件发送电子邮件的教程
http://www.
http://
http://blog.
http://wenku.baidu.com/view/162c88110b4e767f5acfce6c.html
2013-02-22 18:08
one_june
Rank: 4
等 级:业余侠客
帖 子:139
专家分:212
注 册:2010-3-14
得分:0 
以下是引用yms123在2013-2-22 18:08:02的发言:

用不惯jmail
推荐几篇用c#自己的组件发送电子邮件的教程
http://www.
http://
http://blog.
http://wenku.baidu.com/view/162c88110b4e767f5acfce6c.html



非常感谢版主 , 谢谢 ...
2013-02-23 09:18



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-398949-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.133072 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved