Reputation: 956
trying to use javax.mail package. When minify is false, mails are sent. when minify is true, mails are not sent.
This is the AsyncTask doinbackground. When minify is true, exception message is "smtp".
2021-03-31 14:52:35.196 26564-26652/? W: javax.mail.NoSuchProviderException: smtp
2021-03-31 14:52:35.196 26564-26652/? W: at javax.mail.Session.getService(Unknown Source:138)
2021-03-31 14:52:35.196 26564-26652/? W: at javax.mail.Session.getTransport(Unknown Source:10)
2021-03-31 14:52:35.196 26564-26652/? W: at javax.mail.Session.getTransport(Unknown Source:8)
2021-03-31 14:52:35.196 26564-26652/? W: at javax.mail.Session.getTransport(Unknown Source:12)
2021-03-31 14:52:35.196 26564-26652/? W: at javax.mail.Session.getTransport(Unknown Source:14)
2021-03-31 14:52:35.196 26564-26652/? W: at javax.mail.Transport.send0(Unknown Source:61)
2021-03-31 14:52:35.196 26564-26652/? W: at javax.mail.Transport.send(Unknown Source:7)
2021-03-31 14:52:35.196 26564-26652/? W: at com.maor.cohen.utils.EmailUtils$SendMailTask.doInBackground(Unknown Source:3)
2021-03-31 14:52:35.196 26564-26652/? W: at com.maor.cohen.utils.EmailUtils$SendMailTask.doInBackground(Unknown Source:2)
2021-03-31 14:52:35.196 26564-26652/? W: at android.os.AsyncTask$3.call(AsyncTask.java:378)
2021-03-31 14:52:35.196 26564-26652/? W: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
2021-03-31 14:52:35.196 26564-26652/? W: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289)
2021-03-31 14:52:35.196 26564-26652/? W: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
2021-03-31 14:52:35.196 26564-26652/? W: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
2021-03-31 14:52:35.196 26564-26652/? W: at java.lang.Thread.run(Thread.java:919)
asynctask doInBackground:
protected Void doInBackground(javax.mail.Message... messages) {
try {
Transport.send(messages[0]);
} catch (MessagingException e) {
Log.d("log_tag", "excpetion sending mail: " + e.getLocalizedMessage());
e.printStackTrace();
}
return null;
}
I added proguard:
-keep class javax.** {*;}
-keep class javax.* {*;}
-keep class javax.mail.* {*;}
but not succeeded to send mail yet.
Any idea what to do in order to fix this issue? minify must be true and something more should be added there.
Upvotes: 1
Views: 80