mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-28 02:37:16 +00:00
Improved SMTP error message
This commit is contained in:
parent
9c77f3ea43
commit
41825ec2d6
1 changed files with 14 additions and 0 deletions
|
@ -41,6 +41,8 @@ import androidx.core.content.ContextCompat;
|
||||||
import androidx.lifecycle.Observer;
|
import androidx.lifecycle.Observer;
|
||||||
import androidx.preference.PreferenceManager;
|
import androidx.preference.PreferenceManager;
|
||||||
|
|
||||||
|
import com.sun.mail.smtp.SMTPSendFailedException;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -628,6 +630,18 @@ public class ServiceSend extends ServiceBase implements SharedPreferences.OnShar
|
||||||
} catch (MessagingException ex) {
|
} catch (MessagingException ex) {
|
||||||
Log.e(ex);
|
Log.e(ex);
|
||||||
|
|
||||||
|
if (ex instanceof SMTPSendFailedException) {
|
||||||
|
SMTPSendFailedException sem = (SMTPSendFailedException) ex;
|
||||||
|
ex = new SMTPSendFailedException(
|
||||||
|
sem.getCommand(),
|
||||||
|
sem.getReturnCode(),
|
||||||
|
getString(R.string.title_service_auth, sem.getMessage()),
|
||||||
|
sem.getNextException(),
|
||||||
|
sem.getValidSentAddresses(),
|
||||||
|
sem.getValidUnsentAddresses(),
|
||||||
|
sem.getInvalidAddresses());
|
||||||
|
}
|
||||||
|
|
||||||
if (sid != null)
|
if (sid != null)
|
||||||
db.message().deleteMessage(sid);
|
db.message().deleteMessage(sid);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue