mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2025-02-05 06:21:28 +01:00
More error messages!
This commit is contained in:
parent
949ebc03bb
commit
7bfab781a1
@ -95,16 +95,27 @@ public class SendMailSSL {
|
|||||||
ConsoleLogger.showError("Unable to send new password as image! Using normal text! Dest: " + mail);
|
ConsoleLogger.showError("Unable to send new password as image! Using normal text! Dest: " + mail);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
message.setContent(multipart);
|
|
||||||
Transport transport = session.getTransport("smtp");
|
Transport transport = session.getTransport("smtp");
|
||||||
transport.connect(smtp, acc, password);
|
message.setContent(multipart);
|
||||||
|
|
||||||
|
try {
|
||||||
|
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