zoukankan      html  css  js  c++  java
  • C#邮件发送

    1.首页要设置你的邮件账号开启了smtp Server

    2.简单的3.5都显示过期的发送邮件代码

    代码
            MailMessage message = new MailMessage();
            message.From 
    = "120554323@qq.com";
            message.BodyFormat 
    = MailFormat.Html;
            message.Fields.Add(
    "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate""1");
            message.Fields.Add(
    "http://schemas.microsoft.com/cdo/configuration/sendusername""120554323@qq.com");
            message.Fields.Add(
    "http://schemas.microsoft.com/cdo/configuration/sendpassword""pengtaoo");
            SmtpMail.SmtpServer 
    = "smtp.qq.com";
            message.To 
    = "pt120554323@163.com";
            message.Subject 
    = "test";
            message.Body 
    = "teset";
            message.BodyEncoding 
    = Encoding.GetEncoding("gb2312");
            SmtpMail.Send(message);
  • 相关阅读:
    2.13 day 10
    2.12 day9
    Mongo基础知识
    给mongodb设置密码
    前端框架
    SecureCRT的一些设置
    node 服务器框架
    python 知识博客
    数据库记录
    有用的网站
  • 原文地址:https://www.cnblogs.com/dodui/p/1837554.html
Copyright © 2011-2022 走看看