-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v3.2.0
- Loading branch information
xiaoyuanhost
committed
Jan 6, 2021
1 parent
a428b70
commit c218b90
Showing
10 changed files
with
113 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":31,"versionName":"3.1.0","enabled":true,"outputFile":"TSMS_release_20201231_3.1.0.apk","fullName":"release","baseName":"release"},"path":"TSMS_release_20201231_3.1.0.apk","properties":{}}] | ||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":32,"versionName":"3.2.0","enabled":true,"outputFile":"TSMS_release_20210106_3.2.0.apk","fullName":"release","baseName":"release"},"path":"TSMS_release_20210106_3.2.0.apk","properties":{}}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,9 +32,9 @@ public class SenderMailMsg { | |
// private static final String FROM_ADD = "[email protected]"; | ||
// private static final String FROM_PSW = "xx"; | ||
|
||
public static void sendEmail(final boolean handError,final String host, final String port, final String fromemail, final String pwd, final String toAdd, final String title, final String content) { | ||
public static void sendEmail(final Handler handError, final String host, final String port, final boolean ssl, final String fromemail, final String pwd, final String toAdd, final String title, final String content) { | ||
|
||
Log.d(TAG, "sendEmail: host:"+host+" port:"+port+" fromemail:"+fromemail+" pwd:"+pwd+" toAdd:"+toAdd); | ||
Log.d(TAG, "sendEmail: host:" + host + " port:" + port + " ssl:" + ssl + " fromemail:" + fromemail + " pwd:" + pwd + " toAdd:" + toAdd); | ||
new Thread(new Runnable() { | ||
@Override | ||
public void run() { | ||
|
@@ -50,6 +50,7 @@ public void run() { | |
mailInfo.setToAddress(toAdd); | ||
mailInfo.setSubject(title); | ||
mailInfo.setContent(content); | ||
mailInfo.setSsl(ssl); | ||
|
||
//这个类主要来发送邮件 | ||
// 判断是否需要身份认证 | ||
|
@@ -83,38 +84,37 @@ public void run() { | |
|
||
} catch (MessagingException ex) { | ||
ex.printStackTrace(); | ||
Log.e(TAG, "error"+ex.getMessage()); | ||
if(handError){ | ||
Log.e(TAG, "error" + ex.getMessage()); | ||
if (handError != null) { | ||
android.os.Message msg = new android.os.Message(); | ||
msg.what = NOTIFY; | ||
Bundle bundle = new Bundle(); | ||
bundle.putString("DATA",ex.getMessage()); | ||
bundle.putString("DATA", ex.getMessage()); | ||
msg.setData(bundle); | ||
(new Handler()).sendMessage(msg); | ||
handError.sendMessage(msg); | ||
} | ||
|
||
|
||
} | ||
if(handError){ | ||
if (handError != null) { | ||
android.os.Message msg = new android.os.Message(); | ||
msg.what = NOTIFY; | ||
Bundle bundle = new Bundle(); | ||
bundle.putString("DATA","发送成功"); | ||
bundle.putString("DATA", "发送成功"); | ||
msg.setData(bundle); | ||
(new Handler()).sendMessage(msg); | ||
handError.sendMessage(msg); | ||
} | ||
|
||
Log.e(TAG, "sendEmail success");//sms.sendHtmlMail(mailInfo);//发送html格式 | ||
|
||
} catch (Exception e) { | ||
Log.e(TAG, e.getMessage(), e); | ||
if(handError){ | ||
if (handError != null) { | ||
android.os.Message msg = new android.os.Message(); | ||
msg.what = NOTIFY; | ||
Bundle bundle = new Bundle(); | ||
bundle.putString("DATA",e.getMessage()); | ||
bundle.putString("DATA", e.getMessage()); | ||
msg.setData(bundle); | ||
(new Handler()).sendMessage(msg); | ||
handError.sendMessage(msg); | ||
} | ||
|
||
} | ||
|
@@ -125,26 +125,24 @@ public void run() { | |
|
||
/** | ||
* public void sendFileMail(View view) { | ||
* | ||
* File file = new File(Environment.getExternalStorageDirectory()+File.separator+"test.txt"); | ||
* OutputStream os = null; | ||
* try { | ||
* os = new FileOutputStream(file); | ||
* String str = "hello world"; | ||
* byte[] data = str.getBytes(); | ||
* os.write(data); | ||
* } catch (FileNotFoundException e) { | ||
* e.printStackTrace(); | ||
* } catch (IOException e) { | ||
* e.printStackTrace(); | ||
* }finally{ | ||
* try { | ||
* if (os != null)os.close(); | ||
* } catch (IOException e) { | ||
* } | ||
* } | ||
* SenderMailMsg.send(file,editText.getText().toString()); | ||
* } | ||
* | ||
* | ||
* <p> | ||
* File file = new File(Environment.getExternalStorageDirectory()+File.separator+"test.txt"); | ||
* OutputStream os = null; | ||
* try { | ||
* os = new FileOutputStream(file); | ||
* String str = "hello world"; | ||
* byte[] data = str.getBytes(); | ||
* os.write(data); | ||
* } catch (FileNotFoundException e) { | ||
* e.printStackTrace(); | ||
* } catch (IOException e) { | ||
* e.printStackTrace(); | ||
* }finally{ | ||
* try { | ||
* if (os != null)os.close(); | ||
* } catch (IOException e) { | ||
* } | ||
* } | ||
* SenderMailMsg.send(file,editText.getText().toString()); | ||
* } | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.