mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-09 12:10:56 +01:00
More error messages!
This commit is contained in:
parent
949ebc03bb
commit
7bfab781a1
@ -96,15 +96,26 @@ public class SendMailSSL {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
message.setContent(multipart);
|
|
||||||
Transport transport = session.getTransport("smtp");
|
Transport transport = session.getTransport("smtp");
|
||||||
|
message.setContent(multipart);
|
||||||
|
|
||||||
|
try {
|
||||||
transport.connect(smtp, acc, password);
|
transport.connect(smtp, acc, password);
|
||||||
|
} catch (Exception e) {
|
||||||
|
ConsoleLogger.showError("Can't connect to your SMTP server! Aborting! Can't send recorvery email to " + mail);
|
||||||
|
if (file != null)
|
||||||
|
file.delete();
|
||||||
|
return;
|
||||||
|
}
|
||||||
transport.sendMessage(message, message.getAllRecipients());
|
transport.sendMessage(message, message.getAllRecipients());
|
||||||
|
|
||||||
if (file != null)
|
if (file != null)
|
||||||
file.delete();
|
file.delete();
|
||||||
|
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
ConsoleLogger.showError("Some error occured while trying to send a email to " + mail);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
ConsoleLogger.showError("Some error occured while trying to send a mail to " + mail);
|
ConsoleLogger.showError("Some error occured while trying to send a email to " + mail);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user