mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-24 03:05:17 +01:00
email fix
This commit is contained in:
parent
b3add5ca97
commit
017a55ae13
@ -6,7 +6,6 @@ import java.util.Properties;
|
||||
|
||||
import javax.mail.BodyPart;
|
||||
import javax.mail.Message;
|
||||
import javax.mail.MessagingException;
|
||||
import javax.mail.Multipart;
|
||||
import javax.mail.Session;
|
||||
import javax.mail.Transport;
|
||||
@ -73,14 +72,14 @@ public class SendMailSSL {
|
||||
multipart.addBodyPart(messageBodyPart);
|
||||
message.setContent(multipart);
|
||||
final Transport transport = session.getTransport("smtp");
|
||||
transport.connect(Settings.getmailSMTP, Settings.getmailAccount, Settings.getmailPassword);
|
||||
Bukkit.getScheduler().runTaskAsynchronously(plugin, new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
transport.connect(Settings.getmailSMTP, Settings.getmailAccount, Settings.getmailPassword);
|
||||
transport.sendMessage(message, message.getAllRecipients());
|
||||
} catch (MessagingException e) {
|
||||
} catch (Exception e) {
|
||||
System.out.println("Some error occured while trying to send a mail to " + auth.getEmail());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user