Skip to content

Commit

Permalink
重写SMTP邮件发送
Browse files Browse the repository at this point in the history
  • Loading branch information
pppscn committed Feb 19, 2021
1 parent 9360bbb commit 6d89e25
Show file tree
Hide file tree
Showing 18 changed files with 109 additions and 765 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,16 @@ Android手机监听短信并根据指定规则转发到其他手机、钉钉机


### 功能列表:
| 功能 | 描述 |
| ---- | ---- |
| 转发监听 | 已实现 |
| 转发钉钉 | 单个钉钉群已实现 |
| 转发钉钉@某人 | 已实现 |
| 转发邮箱 | 单个邮箱已实现 |
| 转发Bark | 已实现,验证码/动态密码自动复制 |
| 转发企业微信群机器人 | 已实现 |
| 转发web页面 | 单个web页面已实现([向设置的url发送POST请求](doc/POST_WEB.md)|
| 转发规则 | (规则即:什么短信转发到哪里)已实现 |
| 兼容 | 已兼容6.xx、7.xx、8.xx、9.xx、10.xx |

- [x] 监听短信,按规则转发(规则:什么短信内容/来源转发到哪里)
- [x] 转发到钉钉机器人(支持:单个钉钉群,@某人)
- [x] 转发到邮箱(支持:SMTP)
- [x] 转发到Bark(支持:验证码/动态密码自动复制)
- [x] 转发到webhook(支持:单个web页面([向设置的url发送POST请求](doc/POST_WEB.md)))
- [x] 转发到企业微信群机器人(待验证)
- [x] 在线检测新版本、升级
- [x] 清理缓存
- [x] 兼容6.xx、7.xx、8.xx、9.xx、10.xx

### 使用流程:
1. 在Android手机上安装SmsForwarder 本APP后点击应用图标打开
Expand Down Expand Up @@ -80,6 +78,8 @@ Android手机监听短信并根据指定规则转发到其他手机、钉钉机

## 更新记录:

> [v1.2.0](app/release/SmsForwarder_release_20210219_1.2.0.apk) 重写SMTP邮件发送(推荐升级)
> [v1.1.3](app/release/SmsForwarder_release_20210218_1.1.3.apk) AlertDialog增加滚动条,避免参数过长时无法点击按钮
> [v1.1.2](app/release/SmsForwarder_release_20210218_1.1.2.apk) 获取系统(ROM)类别及版本号,MIUI通知栏显示标题
Expand Down
16 changes: 9 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 28
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
defaultConfig {
applicationId "com.idormy.sms.forwarder"
minSdkVersion 23
targetSdkVersion 28
versionCode 5
versionName "1.1.3"
versionCode 6
versionName "1.2.0"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
buildTypes {
Expand Down Expand Up @@ -52,11 +56,6 @@ dependencies {
//fastjson
implementation "com.alibaba:fastjson:1.2.75"

//mail
implementation 'com.sun.mail:android-mail:1.6.0'
implementation 'com.sun.mail:android-activation:1.6.0'
implementation 'com.google.android.material:material:1.0.0'

//android8.0以上需要使用到反射获取隐藏的系统api和动态代理隐藏的抽象类回调
//其中动态代理抽象类回调需要使用ProxyBuilder类,故依赖一个库
//implementation 'com.linkedin.dexmaker:dexmaker-mockito:2.12.1'
Expand All @@ -70,4 +69,7 @@ dependencies {
implementation 'com.github.xuexiangjys.XUpdateAPI:xupdate-easy:1.0.0'
implementation 'com.github.xuexiangjys.XUpdateAPI:xupdate-downloader-aria:1.0.0'

//EmailKit
implementation 'com.github.mailhu:emailkit:4.2.2'

}
Binary file not shown.
6 changes: 3 additions & 3 deletions app/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
{
"type": "SINGLE",
"filters": [],
"versionCode": 5,
"versionName": "1.1.3",
"outputFile": "SmsForwarder_release_20210218_1.1.3.apk"
"versionCode": 6,
"versionName": "1.2.0",
"outputFile": "SmsForwarder_release_20210219_1.2.0.apk"
}
]
}
3 changes: 3 additions & 0 deletions app/src/main/java/com/idormy/sms/forwarder/MyApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import com.idormy.sms.forwarder.utils.SendHistory;
import com.idormy.sms.forwarder.utils.SettingUtil;
import com.smailnet.emailkit.EmailKit;
import com.umeng.analytics.MobclickAgent;
import com.umeng.commonsdk.UMConfigure;

Expand Down Expand Up @@ -78,5 +79,7 @@ public void onCreate() {
}
SendHistory.init(this);
SettingUtil.init(this);

EmailKit.initialize(this);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@ public void onClick(View view) {
adapter.update(senderModels);
}


show.dismiss();


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,18 @@

public class BuildProperties {
private static BuildProperties ourInstance;

public static BuildProperties getInstance() throws IOException {
if (ourInstance == null) ourInstance = new BuildProperties();
return ourInstance;
}

private final Properties properties;

private BuildProperties() throws IOException {
properties = new Properties();
properties.load(new FileInputStream(new File(Environment.getRootDirectory(), "build.prop")));
}

public static BuildProperties getInstance() throws IOException {
if (ourInstance == null) ourInstance = new BuildProperties();
return ourInstance;
}

public boolean containsKey(final Object key) {
return properties.containsKey(key);
}
Expand Down
139 changes: 0 additions & 139 deletions app/src/main/java/com/idormy/sms/forwarder/utils/MailInfo.java

This file was deleted.

Loading

0 comments on commit 6d89e25

Please sign in to comment.