mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2025-02-02 13:01:28 +01:00
Fix Email !
This commit is contained in:
parent
af5d8d17f0
commit
32f0ce00df
@ -46,8 +46,12 @@ public class SendMailSSL {
|
||||
final String subject = Settings.getMailSubject;
|
||||
final String smtp = Settings.getmailSMTP;
|
||||
final String password = Settings.getmailPassword;
|
||||
final String mailText = Settings.getMailText;
|
||||
final String mail = auth.getEmail();
|
||||
String s = Settings.getMailText;
|
||||
s.replace("<playername>", auth.getNickname());
|
||||
s.replace("<servername>", plugin.getServer().getServerName());
|
||||
s.replace("<generatedpass>", newPass);
|
||||
final String mailText = s;
|
||||
|
||||
Bukkit.getScheduler().runTaskAsynchronously(plugin, new Runnable() {
|
||||
|
||||
@ -71,15 +75,11 @@ public class SendMailSSL {
|
||||
message.setSubject(subject);
|
||||
message.setSentDate(new Date());
|
||||
BodyPart messageBodyPart = new MimeBodyPart();
|
||||
messageBodyPart.setText(mailText);
|
||||
|
||||
Multipart multipart = new MimeMultipart();
|
||||
|
||||
messageBodyPart.setText(mailText);
|
||||
multipart.addBodyPart(messageBodyPart);
|
||||
|
||||
messageBodyPart = new MimeBodyPart();
|
||||
|
||||
multipart.addBodyPart(messageBodyPart);
|
||||
message.setContent(multipart);
|
||||
Transport transport = session.getTransport("smtp");
|
||||
transport.connect(smtp, acc, password);
|
||||
|
Loading…
Reference in New Issue
Block a user