奇狐网_SendCloud API发送邮件_XiunoBBS插件
解决问题:
1、服务器封禁25端口,导致无法发送邮件
2、发送邮件时eml文件导出导致服务器IP地址泄露问题
Xiuno默认为PHPMail开源框架,发送邮件。这样可能会导致上述两种问题。
第二种问题,邮件发送成功后,如QQ邮箱等,均支持导出eml文件,用notepad++等编辑器打开该文件,会暴露源站IP地址(CDN无效,详情看下图),安全隐患相当大,就算你CDN再牛逼,找到你源站IP地址,给你来一波流量攻击,那滋味肯定很酸爽。
对接了SendCloud(地址:http://sendcloud.net/,免费套餐)的API,使用其服务器,可以避免上面的问题,更安全。
插件采用overwrite机制,重写发送邮件的model文件,与所有采用xn_send_mail();函数发送邮件的原版程序兼容,不需要额外适配。
安装教程:
下载压缩包解压后上传文件夹到/plugin目录后,进入后台--插件找到刚上传的插件--点击安装

安装完成后,点击设置


在SendCloud API_USER 里面填写 API_USER;
在SendCloud 发信域名 里面填写 发信域名;
在SendCloud API_KEY 里面填写 API_KEY;
API_USER、发信域名 、API_KEY哪来的呢?在这里获取https://www.sendcloud.net/email/#/setting/apiUser

使用插件后的效果:
发送邮件后,进入邮箱点击显示邮件原文或者导出为eml文件

这个是显示原文的截图 箭头指着的位置已经不是你服务器源IP了。

这个是导出为eml文件的截图, 同样的位置也已经不是你服务器源IP了。全文搜索你的IP地址也是没有的。
