Added resend (experimental)

This commit is contained in:
M66B
2021-12-11 20:15:24 +01:00
parent ca34025f34
commit 3cf1726370
6 changed files with 114 additions and 23 deletions

View File

@@ -45,6 +45,7 @@ import com.sun.mail.smtp.SMTPSendFailedException;
import com.sun.mail.smtp.SMTPTransport;
import com.sun.mail.util.TraceOutputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
@@ -711,6 +712,13 @@ public class ServiceSend extends ServiceBase implements SharedPreferences.OnShar
iservice.getTransport().sendMessage(imessage, to);
end = new Date().getTime();
EntityLog.log(this, "Sent " + via + " elapse=" + (end - start) + " ms");
if (BuildConfig.DEBUG) {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
imessage.writeTo(bos);
for (String line : bos.toString().split("\n"))
Log.i("MMM " + line);
}
} catch (MessagingException ex) {
iservice.dump();
Log.e(ex);