diff --git a/src/main/java/com/jamesquinley/Asecure/emailVerify.java b/src/main/java/com/jamesquinley/Asecure/emailVerify.java index fa53f67..a011fd5 100644 --- a/src/main/java/com/jamesquinley/Asecure/emailVerify.java +++ b/src/main/java/com/jamesquinley/Asecure/emailVerify.java @@ -1,5 +1,6 @@ package com.jamesquinley.Asecure; +import javax.jws.soap.SOAPBinding; import javax.mail.*; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeMessage; @@ -18,7 +19,7 @@ public class emailVerify { static final String emailSMTPserver = "smtp.gmail.com"; static final String emailSMTPPort = "465"; - public static void SendEmailThroughGmail(String receiverEmail) { + public static void SendEmailThroughGmail(String receiverEmail, String User) { Date date = new Date(); SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yy"); String Date = formatter.format(date); @@ -38,7 +39,8 @@ public class emailVerify { message.setRecipients(Message.RecipientType.TO, InternetAddress.parse(receiverEmail)); message.setSubject("Obsidian Core Account Login Notice | " + Date); - message.setText("We detected a new login on your account, if this was you ignore this email, if it wasn't you, please login and change your password. \n \n \n \n \n This was sent on behalf of Obsidian Core Studios by our super cool login robots! \n NOTICE: This is a no-reply address."); + message.setText("We detected a new login on your account, if this was you ignore this email, if it wasn't you, please login and change your password. \n \n \n \n \n This was sent on behalf of Obsidian Core Studios by our super cool login robots! \n NOTICE: This is a no-reply address." + + " \n This email (" + receiverEmail + ") is linked to the Obsidian Core Account "+ User + " \n These security emails can't be opted out of."); Transport.send(message); System.out.println("Server Failed To Send User Login Notice"); diff --git a/src/main/java/com/jamesquinley/DelegationServices/delegationServices.java b/src/main/java/com/jamesquinley/DelegationServices/delegationServices.java index ce51631..a252763 100644 --- a/src/main/java/com/jamesquinley/DelegationServices/delegationServices.java +++ b/src/main/java/com/jamesquinley/DelegationServices/delegationServices.java @@ -296,8 +296,8 @@ public class delegationServices { Fname = (String) accountServer.get("FName"); Path = (String) accountServer.get("Path"); Email = (String) accountServer.get("Email"); - com.jamesquinley.Asecure.emailVerify.SendEmailThroughGmail(Email); UserName = (String) accountServer.get("User"); + com.jamesquinley.Asecure.emailVerify.SendEmailThroughGmail(Email, UserName); BasicDBObject searchQuery = new BasicDBObject(); searchQuery.append("clientid", ClientID); @@ -401,9 +401,9 @@ public class delegationServices { Fname = (String) accountServer.get("FName"); Path = (String) accountServer.get("Path"); Email = (String) accountServer.get("Email"); - com.jamesquinley.Asecure.emailVerify.SendEmailThroughGmail(Email); - UserName = (String) accountServer.get("User"); + UserName = (String) accountServer.get("User"); + com.jamesquinley.Asecure.emailVerify.SendEmailThroughGmail(Email, UserName); BasicDBObject searchQuery = new BasicDBObject(); searchQuery.append("clientid", ClientID);