feat: SMTP Compatibility Enhancement and SSL Protocol Support (#174) #213
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Dear @zmh-program ,
此 pr 中修复了原 issue (#174) 中提到的无法在 chatnio 中使用部分第三方 smtp 服务商的问题。经排查,其原因是由于部分服务商对 RFC5321 中
MailFrom
支持仍存在部分问题(即只允许一个 Email 存在于From
的Header
中)。同时mail.v2
库中的 NewDialer 方法的入参依次应为 “主机”、“端口”、“用户名”、“密码” 而非 “主机”、“端口”、“发件人”、“密码” ;同时根据 #174 中的建议 #174 (comment) “添加更多自定义配置”,故决定将判断是否存在 @ 值的正则反过来,即输入中需要附带 @ 且不再判断 @ 后域是否与“发件域名”中的主域名一致。综以上两点,在新的 pr 中作出如下修改修改为
另:实现了 SMTP 的
TLS / SSL
协议切换,可根据需要自行选择Best Regards,
Junhai Deng