<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>To on 备忘</title>
    <link>https://blog.witd.in/tags/to/</link>
    <description>Recent content in To on 备忘</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <managingEditor>kongfei605@gmail.com (kongfei)</managingEditor>
    <webMaster>kongfei605@gmail.com (kongfei)</webMaster>
    <copyright>(c) 2022 witd. All rights reserved</copyright>
    <lastBuildDate>Sun, 01 Apr 2018 17:38:53 +0800</lastBuildDate>
    
	<atom:link href="https://blog.witd.in/tags/to/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>golang邮件抄送</title>
      <link>https://blog.witd.in/2018/04/01/golang%E9%82%AE%E4%BB%B6%E6%8A%84%E9%80%81/</link>
      <pubDate>Sun, 01 Apr 2018 17:38:53 +0800</pubDate>
      <author>kongfei605@gmail.com (kongfei)</author>
      <guid>https://blog.witd.in/2018/04/01/golang%E9%82%AE%E4%BB%B6%E6%8A%84%E9%80%81/</guid>
      <description>&lt;p&gt;最近接触的一个api模块中使用了smtp.SendMail发送邮件。因为要实现cc功能，看了下源码，简单记录下。&lt;/p&gt;

&lt;p&gt;smtp中关于SendMail的声明&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;SendMail(addr string, a Auth, from string, to []string, msg []byte) error
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;参数依次是,&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;    addr: smtp server地址，格式为hostname:port 或者 ip:port;
    a: smtp PlainAuth信息, 包含identity, username, password, host, 即身份id、用户名、密码、smtp服务器host. identify 一般为空，表明identity与username一致;
    from: 发件邮箱
    to: 收件人地址列表,包含to，cc，bcc的所有收件地址
    msg: 邮件内容,包含邮件header和body
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;来一个栗子&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>