• 企业400电话
  • 微网小程序
  • AI电话机器人
  • 电商代运营
  • 全 部 栏 目

    企业400电话 网络优化推广 AI电话机器人 呼叫中心 网站建设 商标✡知产 微网小程序 电商运营 彩铃•短信 增值拓展业务
    ASP.Net邮箱发邮件实例代码

    复制代码 代码如下:

     public static void SendEmail()
        {

            System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient();
            //这里使用QQ的邮箱来发送测试,如果是其它邮箱,请根据其它邮箱POP3/IMAP/SMTP服务来设置

            client.Host = "smtp.qq.com";
            client.UseDefaultCredentials = false;
            client.Credentials = new System.Net.NetworkCredential("6你的邮箱www.jb51.net", "***密码***");
            client.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
            System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage("60**你的*www.jb51.net"541**收件人的www.jb51.net");
            message.Subject = "主题";
            message.Body = "内容";
            message.BodyEncoding = System.Text.Encoding.UTF8;
            message.IsBodyHtml = true;

            try
            {
                client.Send(message);


            }
            catch
            {

            }

        }

    您可能感兴趣的文章:
    • 在ASP.NET Core 中发送邮件的实现方法(必看篇)
    • ASP.NET Core 1.0实现邮件发送功能
    • Asp.net发送邮件的两种方法小结
    • asp.net发邮件的几种方法汇总
    • 在asp.NET 中使用SMTP发送邮件的实现代码
    • asp.net2.0实现邮件发送(测试成功)
    • asp.net System.Net.Mail 发送邮件
    • 在ASP.NET2.0中通过Gmail发送邮件的代码
    • Asp.Net类库中发送电子邮件的代码
    • ASP.NET Core发送邮件的方法
    上一篇:Asp.Net FckEditor在web.config中配置的具体实例
    下一篇:asp.net代码中修改web.config节点的具体方法
  • 相关文章
  • 

    © 2016-2020 巨人网络通讯

    时间:9:00-21:00 (节假日不休)

    地址:江苏信息产业基地11号楼四层

    《增值电信业务经营许可证》 苏B2-20120278

    ASP.Net邮箱发邮件实例代码 ASP.Net,邮箱,发,邮件,实例,