<commit_before>package com.battleweb.tools;


import java.util.Properties;

import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.mail.Authenticator;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;

/**
 * @author <NAME>
 * 
 */
@Stateless
@LocalBean
public class ToolEmail {
	
	 	private String username;
	    private String password;
	    private Properties props;
	 
	   {
	        this.username = "<EMAIL>";
	        this.password = "<PASSWORD>";
	 
	        props = new Properties();
	        props.put("mail.smtp.auth", "true");
	        props.put("mail.smtp.starttls.enable", "true");
	        props.put("mail.smtp.host", "smtp.gmail.com");
	        props.put("mail.smtp.port", "587");
	    }
	 
	    public void send(final String subject, final String text, final String toEmail){
	        final Session session = Session.getInstance(props, new Authenticator() {
	            protected PasswordAuthentication getPasswordAuthentication() {
	                return new PasswordAuthentication(username, password);
	            }
	        });
	        new Thread(new Runnable() {
				
				@Override
				public void run() {
					  try {
				            Message message = new MimeMessage(session);
				            message.setFrom(new InternetAddress(username));
				            message.setRecipients(Message.RecipientType.TO, InternetAddress.parse(toEmail));
				            message.setSubject(subject);
				            message.setText(text);
				 
				            Transport.send(message);
				        } catch (MessagingException e) {
				            throw new RuntimeException(e);
				        }
				}
			}).start();
	      
	    }
	
}<commit_msg>sending email with HTML tags<commit_after>package com.battleweb.tools;


import java.util.Properties;

import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.mail.Authenticator;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;

/**
 * @author <NAME>
 * 
 */
@Stateless
@LocalBean
public class ToolEmail {
	
	 	private String username;
	    private String password;
	    private Properties props;
	 
	   {
	        this.username = "<EMAIL>";
	        this.password = "<PASSWORD>";
	 
	        props = new Properties();
	        props.put("mail.smtp.auth", "true");
	        props.put("mail.smtp.starttls.enable", "true");
	        props.put("mail.smtp.host", "smtp.gmail.com");
	        props.put("mail.smtp.port", "587");
	    }
	 
	    public void send(final String subject, final String text, final String toEmail){
	        final Session session = Session.getInstance(props, new Authenticator() {
	            protected PasswordAuthentication getPasswordAuthentication() {
	                return new PasswordAuthentication(username, password);
	            }
	        });
	        new Thread(new Runnable() {
				
				@Override
				public void run() {
					  try {
				            Message message = new MimeMessage(session);
				            message.setFrom(new InternetAddress(username));
				            message.setRecipients(Message.RecipientType.TO, InternetAddress.parse(toEmail));
				            message.setSubject(subject);
				            message.setContent(text, "text/html");
				 
				            Transport.send(message);
				        } catch (MessagingException e) {
				            throw new RuntimeException(e);
				        }
				}
			}).start();
	      
	    }
	
}
{'fraction_non_alphanumeric': 0.11019430396593026, 'fraction_numerical': 0.0015970188980569604, 'mean_word_length': 2.413260672116258, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3866716', 'n_tokens_mistral': 1198, 'n_tokens_neox': 980, 'n_words': 215}