@@ -0,0 +1,1576 @@
+package backClasses;%0A%0Aimport java.util.Properties;%0A%0Aimport javax.mail.Message;%0Aimport javax.mail.MessagingException;%0Aimport javax.mail.Session;%0Aimport javax.mail.Transport;%0Aimport javax.mail.internet.AddressException;%0Aimport javax.mail.internet.InternetAddress;%0Aimport javax.mail.internet.MimeMessage;%0A%0Apublic class EMailSender %7B%0A%0A%09// from = %22hrgeofreeuni@gmail.com%22 pass = %22hrgeofreeuni1%22%0A%09public static  void sendEmail(String to, String body, String from, String pass) %7B%0A%09%09 %09%0A%09        Properties props = System.getProperties();%0A%09        String host = %22smtp.gmail.com%22;%0A%09        props.put(%22mail.smtp.starttls.enable%22, %22true%22);%0A%09        props.put(%22mail.smtp.host%22, host);%0A%09        props.put(%22mail.smtp.user%22, from);%0A%09        props.put(%22mail.smtp.password%22, pass);%0A%09        props.put(%22mail.smtp.port%22, %22587%22);%0A%09        props.put(%22mail.smtp.auth%22, %22true%22);%0A%09        %0A%09        Session session = Session.getDefaultInstance(props);%0A%09        MimeMessage message = new MimeMessage(session);%0A%09        try %7B%0A%09%09%09%09message.setFrom(new InternetAddress(%22from-email@gmail.com%22));%0A%09%09%09%09message.setRecipients(Message.RecipientType.TO,InternetAddress.parse(to));%0A%09%09%09%09message.setSubject(%22HR Georgia%22,%22UTF-8%22);%0A%09%09%09%09message.setText(%22%E1%83%9B%E1%83%94%E1%83%A1%E1%83%98%E1%83%AF%E1%83%98 %22 + body ,%22UTF-8%22);%0A%09%09%09%09Transport transport = session.getTransport(%22smtp%22);%0A%09%09        transport.connect(host, from, pass);%0A%09%09        transport.sendMessage(message, message.getAllRecipients());%0A%09%09        transport.close();%0A%09%09%09%7D catch (AddressException e) %7B%0A%09%09%09%09e.printStackTrace();%0A%09%09%09%7D catch (MessagingException e) %7B%0A%09%09%09%09e.printStackTrace();%0A%09%09%09%7D%0A%09 %7D%0A%0A%09%0A%09%0A%7D%0A

email sender