<commit_before>/**
 * <p>Title: EmailHandler Class>
 * <p>Description:	EmailHandler is used to send emails during user signup, creation, forgot password.</p>
 * Copyright:    Copyright (c) year
 * Company: Washington University, School of Medicine, St. Louis.
 * @author <NAME>
 * @version 1.00
 */

package edu.wustl.catissuecore.util;

import edu.wustl.catissuecore.domain.ReportedProblem;
import edu.wustl.catissuecore.domain.User;
import edu.wustl.catissuecore.util.global.ApplicationProperties;
import edu.wustl.catissuecore.util.global.Constants;
import edu.wustl.catissuecore.util.global.SendEmail;
import edu.wustl.catissuecore.util.global.Variables;
import edu.wustl.common.security.SecurityManager;
import edu.wustl.common.security.exceptions.SMException;
import edu.wustl.common.util.PasswordManager;
import edu.wustl.common.util.dbManager.DAOException;
import edu.wustl.common.util.logger.Logger;

/**
 * EmailHandler is used to send emails during user signup, creation, forgot password.
 * @author gautam_shetty
 */
public class EmailHandler
{
    /**
     * Creates and sends the user registration approval emails to user and the administrator.
     * @param user The user whose registration is approved.
     * @param roleOfUser Role of the user.
     */
    public void sendApprovalEmail(User user) throws DAOException
    {
        String subject = ApplicationProperties
        					.getValue("userRegistration.approve.subject");
        
        String body = "Dear " + user.getLastName() +
			        " " + user.getFirstName() +
			        "\n\n"+ ApplicationProperties.getValue("userRegistration.approved.body.start") +
			        getUserDetailsEmailBody(user); // Get the user details in the body of the email.
			        
        //Send login details email to the user.
        sendLoginDetailsEmail(user, body);
			        <commit_msg>did changes in import statement<commit_after>/**
 * <p>Title: EmailHandler Class>
 * <p>Description:	EmailHandler is used to send emails during user signup, creation, forgot password.</p>
 * Copyright:    Copyright (c) year
 * Company: Washington University, School of Medicine, St. Louis.
 * @author <NAME>
 * @version 1.00
 */

package edu.wustl.catissuecore.util;

import edu.wustl.catissuecore.domain.ReportedProblem;
import edu.wustl.catissuecore.domain.User;
import edu.wustl.catissuecore.util.global.ApplicationProperties;
import edu.wustl.catissuecore.util.global.Constants;
import edu.wustl.catissuecore.util.global.SendEmail;
import edu.wustl.catissuecore.util.global.Variables;
import edu.wustl.common.security.SecurityManager;
import edu.wustl.common.security.exceptions.SMException;
import edu.wustl.catissuecore.util.PasswordManager;
import edu.wustl.common.util.dbManager.DAOException;
import edu.wustl.common.util.logger.Logger;

/**
 * EmailHandler is used to send emails during user signup, creation, forgot password.
 * @author gautam_shetty
 */
public class EmailHandler
{
    /**
     * Creates and sends the user registration approval emails to user and the administrator.
     * @param user The user whose registration is approved.
     * @param roleOfUser Role of the user.
     */
    public void sendApprovalEmail(User user) throws DAOException
    {
        String subject = ApplicationProperties
        					.getValue("userRegistration.approve.subject");
        
        String body = "Dear " + user.getLastName() +
			        " " + user.getFirstName() +
			        "\n\n"+ ApplicationProperties.getValue("userRegistration.approved.body.start") +
			        getUserDetailsEmailBody(user); // Get the user details in the body of the email.
			        
        //Send login details email to the user.
        sendLoginDetailsEmail(user, body);
			        
{'fraction_non_alphanumeric': 0.09887760555852486, 'fraction_numerical': 0.0016034206306787815, 'mean_word_length': 3.5259975816203144, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '3398992', 'n_tokens_mistral': 1131, 'n_tokens_neox': 1084, 'n_words': 280}