@Transactional()
  @Override
  public EmailResponse resendConfirmationthroughEmail(
      String applicationId, String securityToken, String emailId, String appName) {
    logger.info("UserManagementProfileServiceImpl - resendConfirmationthroughEmail() - Starts");
    AppEntity appPropertiesDetails = null;
    String content = "";
    String subject = "";
    AppOrgInfoBean appOrgInfoBean = null;
    appOrgInfoBean = commonDao.getUserAppDetailsByAllApi("", applicationId);
    appPropertiesDetails =
        userProfileManagementDao.getAppPropertiesDetailsByAppId(appOrgInfoBean.getAppInfoId());
    Map<String, String> templateArgs = new HashMap<>();
    if ((appPropertiesDetails == null)
        || (appPropertiesDetails.getRegEmailSub() == null)
        || (appPropertiesDetails.getRegEmailBody() == null)
        || appPropertiesDetails.getRegEmailBody().equalsIgnoreCase("")
        || appPropertiesDetails.getRegEmailSub().equalsIgnoreCase("")) {
      subject = appConfig.getConfirmationMailSubject();
      content = appConfig.getConfirmationMail();
    } else {
      content = appPropertiesDetails.getRegEmailBody();
      subject = appPropertiesDetails.getRegEmailSub();
    }
    templateArgs.put("appName", appName);
    // TODO(#496): replace with actual study's org name.
    templateArgs.put("orgName", appConfig.getOrgName());
    templateArgs.put("contactEmail", appConfig.getContactEmail());
    templateArgs.put("securitytoken", securityToken);
    EmailRequest emailRequest =
        new EmailRequest(
            appConfig.getFromEmail(),
            new String[] {emailId},
            null,
            null,
            subject,
            content,
            templateArgs);
    logger.info("UserManagementProfileServiceImpl - resendConfirmationthroughEmail() - Ends");
    return emailService.sendMimeMail(emailRequest);
  }
@Transactional()
  @Override
  public EmailResponse resendConfirmationthroughEmail(
      String applicationId, String securityToken, String emailId, String appName) {
    logger.info("UserManagementProfileServiceImpl - resendConfirmationthroughEmail() - Starts");
    AppEntity appPropertiesDetails = null;
    String content = "";
    String subject = "";
    AppOrgInfoBean appOrgInfoBean = null;
    appOrgInfoBean = commonDao.getUserAppDetailsByAllApi("", applicationId);
    appPropertiesDetails =
        userProfileManagementDao.getAppPropertiesDetailsByAppId(appOrgInfoBean.getAppInfoId());
    Map<String, String> templateArgs = new HashMap<>();
    if ((appPropertiesDetails == null)
        || (appPropertiesDetails.getRegEmailSub() == null)
        || (appPropertiesDetails.getRegEmailBody() == null)
        || appPropertiesDetails.getRegEmailBody().equalsIgnoreCase("")
        || appPropertiesDetails.getRegEmailSub().equalsIgnoreCase("")) {
      subject = appConfig.getConfirmationMailSubject();
      content = appConfig.getConfirmationMail();
    } else {
      content = appPropertiesDetails.getRegEmailBody();
      subject = appPropertiesDetails.getRegEmailSub();
    }
    templateArgs.put("appName", appName);
   
    templateArgs.put("orgName", appConfig.getOrgName());
    templateArgs.put("contactEmail", appConfig.getContactEmail());
    templateArgs.put("securitytoken", securityToken);
    EmailRequest emailRequest =
        new EmailRequest(
            appConfig.getFromEmail(),
            new String[] {emailId},
            null,
            null,
            subject,
            content,
            templateArgs);
    logger.info("UserManagementProfileServiceImpl - resendConfirmationthroughEmail() - Ends");
    return emailService.sendMimeMail(emailRequest);
  }
@transactional() @override public emailresponse resendconfirmationthroughemail( string applicationid, string securitytoken, string emailid, string appname) { logger.info("usermanagementprofileserviceimpl - resendconfirmationthroughemail() - starts"); appentity apppropertiesdetails = null; string content = ""; string subject = ""; apporginfobean apporginfobean = null; apporginfobean = commondao.getuserappdetailsbyallapi("", applicationid); apppropertiesdetails = userprofilemanagementdao.getapppropertiesdetailsbyappid(apporginfobean.getappinfoid()); map<string, string> templateargs = new hashmap<>(); if ((apppropertiesdetails == null) || (apppropertiesdetails.getregemailsub() == null) || (apppropertiesdetails.getregemailbody() == null) || apppropertiesdetails.getregemailbody().equalsignorecase("") || apppropertiesdetails.getregemailsub().equalsignorecase("")) { subject = appconfig.getconfirmationmailsubject(); content = appconfig.getconfirmationmail(); } else { content = apppropertiesdetails.getregemailbody(); subject = apppropertiesdetails.getregemailsub(); } templateargs.put("appname", appname); templateargs.put("orgname", appconfig.getorgname()); templateargs.put("contactemail", appconfig.getcontactemail()); templateargs.put("securitytoken", securitytoken); emailrequest emailrequest = new emailrequest( appconfig.getfromemail(), new string[] {emailid}, null, null, subject, content, templateargs); logger.info("usermanagementprofileserviceimpl - resendconfirmationthroughemail() - ends"); return emailservice.sendmimemail(emailrequest); }