# EmailUtil **Repository Path**: lexiaoy/EmailUtil ## Basic Information - **Project Name**: EmailUtil - **Description**: 轻量级的邮箱告警工具 - **Primary Language**: Java - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-10 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # EmailUtil #### 介绍 对指定邮箱中收到的邮件,进行告警操作
是一个轻量级的工具,插拔方便
针对一下使用者适用
1.每天邮箱接入大量邮件,有轻重缓急,但是因为量大,经常错过邮件,或者找个邮件不好找
2.方便将多个邮箱里面的邮件,汇总到一个邮箱里面来 2.对特定的邮件需要进行提醒
3.单纯就接入一下告警,jar包拿过去,做好配置起来就可以用
4.做深入的告警功能,可根据代码进行自由扩展
5.如果想做邮箱操作方面的功能,代码拿过去改改就好了. #### 软件架构 采用了springboot框架
发邮件采用 smtp协议
管理邮件使用 imap协议
单个jar包+一个jar包外配置文件的组合
1.jar包起来就能用
2.外置配置文件,可随时更改,程序设定每59秒刷新一次配置
3.每1分钟从邮箱拉取邮件,通过规则判断是否需要发告警邮件给指定用户,同时密送给备份的邮箱
4.处理完毕之后,已拉取的邮件进行删除
#### 安装教程 全部的配置在这个文件
emailConf.json {
"mainEmail": "xxxx@qq.com", --主邮箱
"mainEmailPwd": "xxxxx", --主邮箱密码-----后续版本将支持加解密以提高安全
"bakEmail": "xxxxx@qq.com", --备份邮箱地址
"ccEmail": [], --密送邮箱地址,如有需要可配置
"rules": [ --规则
{
"type": "subject", --规则类型:{subject:主题,content:正文}
"contain": "test", --contain标识包含字符串为test
"send": "world", --发出告警时的内容
"descrption": "主题中只要包含hello,就发邮件告警", ----这只是一句备注,不配也行
"userEmail": [ ----当告警发生时,需要发给哪些人,....
"xxxxx@qq.com",
"xxxxx@qq.com",
"xxxx@163.com",
"xxxx@126.com"
]
},
{
"type": "content", ----以正文为告警类型,当正文中包含hello时,发送一封内容为gogogo的邮件给指定用户,同时密送给备份邮箱,执行完毕删除之..
"contain": "hello",
"send": "gogogo",
"descrption": "主题中只要包含hello,就发邮件告警",
"userEmail": [
"xxxx@163.com",
"xxxx@126.com"
]
}
]
}
#### 使用说明 1.找到jar包 cmd命令 java -jar EmailUtil.jar #### 参与贡献 857812506@qq.com #### 码云特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)