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);
  • 相关阅读:
    Count_sort C++
    Priority_Queue C++
    HeapSort C++
    Randomized_QuickSort C++
    QuickSort c++
    我的开发环境
    github and eclipse
    centos 7 install eclipse cdt and use github
    github commands
    文化-梁晓声
  • 原文地址:https://www.cnblogs.com/dodui/p/1837554.html
Copyright © 2011-2022 走看看