惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The Hacker News
The Hacker News
D
Docker
GbyAI
GbyAI
Y
Y Combinator Blog
C
Check Point Blog
M
MIT News - Artificial intelligence
Martin Fowler
Martin Fowler
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Blog — PlanetScale
Blog — PlanetScale
P
Palo Alto Networks Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
V
Vulnerabilities – Threatpost
I
InfoQ
Simon Willison's Weblog
Simon Willison's Weblog
博客园_首页
T
Threat Research - Cisco Blogs
J
Java Code Geeks
Hacker News - Newest:
Hacker News - Newest: "LLM"
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
阮一峰的网络日志
阮一峰的网络日志
O
OpenAI News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Recent Announcements
Recent Announcements
Forbes - Security
Forbes - Security
AWS News Blog
AWS News Blog
雷峰网
雷峰网
博客园 - 三生石上(FineUI控件)
S
Security Affairs
H
Heimdal Security Blog
Engineering at Meta
Engineering at Meta
T
Troy Hunt's Blog
T
Tenable Blog
MongoDB | Blog
MongoDB | Blog
H
Hacker News: Front Page
IT之家
IT之家
N
News and Events Feed by Topic
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
G
GRAHAM CLULEY
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
Visual Studio Blog
S
Secure Thoughts
U
Unit 42
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
The Last Watchdog
The Last Watchdog
S
Security @ Cisco Blogs
NISL@THU
NISL@THU
T
The Blog of Author Tim Ferriss

博客园 - 青争竹马

创建 abp.io Abp VNext 项目 非 Web 应用程序中的用户机密 sortablejs 拖拽库 在Vue 组合模式下的使用 引用非当前解决方案sln的项目csproj编译报错 Windows 剪贴板与远程桌面共享失效 在浏览器F12中使用debugger调试选择不到的元素 Linux Debian 通过 /etc/profile 设置环境变量 Monorepo 之 Yarn Workspaces 中使用 npm-run-all 一次同时运行多个项目 UniApp 反向代理配置 - 本地开发解决跨域问题 Data is Null. This method or property cannot be called on Null values. Install Kibana with Docker Centos7重装Python和Yum SignalR, No Connection with that ID,IIS SQL Server Management Studio IDE中可以命中的索引是Index Seek但是在写的程序中却是Index Scan ssh-copy-id 之后ssh还是提示输入密码的问题 Docker容器中连接Sql Server数据库报错 provider: SSL Provider, error: 31 - Encryption(ssl/tls) handshake failed cdn.devolutions.net ip foxmail windows 每次打开都需要登录账号 错误 NU1105 找不到“xx.csproj”的项目信息。如果使用 Visual Studio,这可能是因为该项目已被卸载或不属于当前解决方案,因此请从命令行运行还原。否则,项目文件可能无效或缺少还原所需的目标。 xxx xxx.csproj Jenkins 构建踩坑经历
log4net SmtpAppender 踩坑总结
青争竹马 · 2019-09-26 · via 博客园 - 青争竹马

错误集合:

System.Net.Mail.SmtpException: 命令顺序不正确。 服务器响应为:Error: need EHLO and AUTH first !

System.Net.Mail.SmtpException: 发送邮件失败。 ---> System.IO.IOException: 无法从传输连接中读取数据: net_io_connectionclosed。

经过阅读SmtpAppender源代码和反复调试对比发现是缺少了 authentication 的配置,包括值(None、Basic(需要账号和密码)、Ntlm),现在邮件服务器都支持SSL,所以还需要注意端口号的配置

发送腾讯邮件为例

  <appender name="SmtpAppender" type="log4net.Appender.SmtpAppender">
    <to value="目标邮件@xxx.com" />
    <from value="发送邮件@xxx.com" />
    <username value="发送邮件@xxx.com"/>
    <subject value="主体" />
    <password value="密码"/>
    <authentication value="Basic" />
    <smtpHost value="smtp.exmail.qq.com" />
    <bufferSize value="512" />
    <lossy value="true" />
    <enableSsl value="true" />
    <port value="587"/>
    <evaluator type="log4net.Core.LevelEvaluator">
      <threshold value="WARN"/>
    </evaluator>
    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%newline%date [%thread] %-5level %logger [%property{NDC}] - %message%newline%newline%newline" />
    </layout>
  </appender>

 注意加红色字体的配置