Commit bec7a843 authored by Vijay Akula's avatar Vijay Akula

Added the mail feature

parent 1a6bf527
......@@ -64,4 +64,9 @@ dependencies {
compile('org.springframework.boot:spring-boot-starter-web')
compile('io.springfox:springfox-swagger2:2.7.0')
compile('io.springfox:springfox-swagger-ui:2.7.0')
compile group: 'org.thymeleaf', name: 'thymeleaf-spring4', version: '2.1.5.RELEASE'
compile group: 'nz.net.ultraq.thymeleaf', name: 'thymeleaf-layout-dialect', version: '1.4.0'
}
package com.nisum.myteam.configuration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.thymeleaf.spring4.SpringTemplateEngine;
import org.thymeleaf.spring4.templateresolver.SpringResourceTemplateResolver;
import org.thymeleaf.templatemode.StandardTemplateModeHandlers;
import java.nio.charset.StandardCharsets;
@Configuration
public class ThymeLeafConfig {
@Bean
public SpringTemplateEngine springTemplateEngine() {
SpringTemplateEngine templateEngine = new SpringTemplateEngine();
templateEngine.addTemplateResolver(htmlTemplateResolver());
return templateEngine;
}
@Bean
public SpringResourceTemplateResolver htmlTemplateResolver(){
SpringResourceTemplateResolver emailTemplateResolver = new SpringResourceTemplateResolver();
//emailTemplateResolver.setPrefix("/templates/");
// emailTemplateResolver.setPrefix("/WEB-INF/thymeleaf/templates/");
emailTemplateResolver.setPrefix("/resources/templates/");
emailTemplateResolver.setSuffix(".html");
emailTemplateResolver.setTemplateMode(StandardTemplateModeHandlers.HTML5.getTemplateModeName());
emailTemplateResolver.setCharacterEncoding(StandardCharsets.UTF_8.name());
return emailTemplateResolver;
}
}
......@@ -22,6 +22,7 @@ public class AttendenceData implements Serializable {
private String employeeId;
private String employeeName;
private String emailId;
private String present;
private int totalPresent;
private int totalAbsent;
......
package com.nisum.myteam.model;
import lombok.*;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import java.io.Serializable;
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Document(collection = "functionalGroups")
public class FunctionalGroup implements Serializable {
private static final long serialVersionUID = 1L;
@Id
private ObjectId id;
private String name;
private String groupHeadName;
private String groupHeadEmpId;
private String groupHeadEmailId;
}
package com.nisum.myteam.model;
import java.util.List;
import java.util.Map;
public class Mail {
private String from;
private String to;
private String[] cc;
private String[] bcc;
private String subject;
private List<Object> attachments;
private Map<String, Object> model;
private String empName;
public Mail() {
}
public String getFrom() {
return from;
}
public void setFrom(String from) {
this.from = from;
}
public String getTo() {
return to;
}
public void setTo(String to) {
this.to = to;
}
public String[] getCc() {
return cc;
}
public void setCc(String[] cc) {
this.cc = cc;
}
public String[] getBcc() {
return bcc;
}
public void setBcc(String[] bcc) {
this.bcc = bcc;
}
public String getSubject() {
return subject;
}
public void setSubject(String subject) {
this.subject = subject;
}
public List<Object> getAttachments() {
return attachments;
}
public void setAttachments(List<Object> attachments) {
this.attachments = attachments;
}
public Map<String, Object> getModel() {
return model;
}
public void setModel(Map<String, Object> model) {
this.model = model;
}
public String getEmpName() {
return empName;
}
public void setEmpName(String empName) {
this.empName = empName;
}
}
......@@ -134,6 +134,8 @@ public class Employee implements Serializable {
private String modifiedBy;
@Override
public int hashCode() {
final int prime = 31;
......
package com.nisum.myteam.repository;
import com.nisum.myteam.model.FunctionalGroup;
import com.nisum.myteam.model.FunctionalGroup;
import org.springframework.data.mongodb.repository.MongoRepository;
public interface FunctionalGroupRepo extends MongoRepository<FunctionalGroup, String> {
public FunctionalGroup findByName(String functionalGroupName);
}
package com.nisum.myteam.schedular;
import com.nisum.myteam.exception.handler.MyTeamException;
import com.nisum.myteam.model.AttendenceData;
import com.nisum.myteam.model.FunctionalGroup;
import com.nisum.myteam.model.Mail;
import com.nisum.myteam.model.dao.Employee;
import com.nisum.myteam.service.IFunctionalGroupService;
import com.nisum.myteam.service.IMailService;
import com.nisum.myteam.service.impl.AttendanceService;
import com.nisum.myteam.service.impl.EmployeeService;
import com.nisum.myteam.statuscodes.EmployeeStatus;
import com.nisum.myteam.utils.MyTeamUtils;
import com.nisum.myteam.utils.constants.EmpSubStatus;
import com.nisum.myteam.utils.constants.Shifts;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import javax.mail.MessagingException;
import java.io.IOException;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@Component
public class LeaveNotificationScheduler {
private static final Logger logger = LoggerFactory.getLogger(LeaveNotificationScheduler.class);
private static final DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
@Autowired
private IMailService mailService;
@Autowired
private AttendanceService attendanceService;
@Autowired
private Environment environment;
@Autowired
private EmployeeService employeeService;
@Autowired
private IFunctionalGroupService functionalGroupService;
//@Scheduled(cron = "0 * * * * ?")
@Scheduled(cron = "00 50 15 * * 1-5")
public void scheduleLeaveMailForShift1Empls() throws IOException, MessagingException, MyTeamException {
//Shift 1(9:00 AM - 6:00 PM)
logger.info(Shifts.SHIFT1.getShiftType() + " :: Execution Time - {}", dateTimeFormatter.format(LocalDateTime.now()));
sendMailToAbsentees(Shifts.SHIFT1.getShiftType());
}
@Scheduled(cron = "00 00 18 * * 1-5")
public void scheduleLeaveMailForShift2Empls() throws IOException, MessagingException, MyTeamException {
//Shift-2(2:00 PM - 11:00 PM)--General Shift
logger.info(Shifts.SHIFT2.getShiftType() + " :: Execution Time - {}", dateTimeFormatter.format(LocalDateTime.now()));
sendMailToAbsentees(Shifts.SHIFT2.getShiftType());
}
@Scheduled(cron = "00 00 02 * * 2-6")
public void scheduleLeaveMailForShift3Empls() throws IOException, MessagingException, MyTeamException {
//Shift 3(10:00 PM - 6:00 AM)
logger.info(Shifts.SHIFT3.getShiftType() + " :: Execution Time - {}", dateTimeFormatter.format(LocalDateTime.now()));
sendMailToAbsentees(Shifts.SHIFT3.getShiftType());
}
@Scheduled(cron = "00 30 11 * * 1-5")
public void scheduleLeaveMailForShift4Empls() throws IOException, MessagingException, MyTeamException {
//Shift 4(7:30 AM - 3:30 PM)
logger.info(Shifts.SHIFT4.getShiftType() + " :: Execution Time - {}", dateTimeFormatter.format(LocalDateTime.now()));
sendMailToAbsentees(Shifts.SHIFT4.getShiftType());
}
@Scheduled(cron = "00 30 15 * * 1-5")
public void scheduleLeaveMailForShift5Empls() throws IOException, MessagingException, MyTeamException {
//Shift 5(11:30 AM - 7:30 PM)
logger.info(Shifts.SHIFT5.getShiftType() + " :: Execution Time - {}", dateTimeFormatter.format(LocalDateTime.now()));
sendMailToAbsentees(Shifts.SHIFT5.getShiftType());
}
private void sendMailToAbsentees(String shift) throws IOException, MessagingException, MyTeamException {
Mail mail = new Mail();
mail.setFrom(environment.getProperty("email.leave.notification.from"));
mail.setSubject(environment.getProperty("email.leave.notification.subject"));
Map<String, Object> model = new HashMap<String, Object>();
String currentDate = dateTimeFormatter.format(LocalDateTime.now());
String functionalGroupName;
FunctionalGroup functionalGroup;
Employee employee;
String empSubStatus;
try {
List<AttendenceData> attendenceList = attendanceService.getAttendanciesReport(currentDate, shift);
List<AttendenceData> absentiesList = attendenceList.stream()
.filter(attendance -> attendance.getPresent().equalsIgnoreCase(MyTeamUtils.ABSENT)).collect(Collectors.toList());
for (AttendenceData absentee : absentiesList) {
//model.put("employeeName", );//mail.setModel(model);
employee = employeeService.getEmployeeById(absentee.getEmployeeId());
empSubStatus = employee.getEmpSubStatus();
if(empSubStatus==null)
empSubStatus="";
if (employee.getEmpStatus().equalsIgnoreCase(EmployeeStatus.ACTIVE.getStatus()) && !empSubStatus.equalsIgnoreCase(EmpSubStatus.LONG_LEAVE.getLeaveType()) &&
!empSubStatus.equalsIgnoreCase(EmpSubStatus.MATERNITY_LEAVE.getLeaveType()) &&
!empSubStatus.equalsIgnoreCase(EmpSubStatus.ONSITE_TRAVEL.getLeaveType())) {
logger.info("Mail Notification is sending to:" + absentee.getEmployeeName() + "::" + absentee.getEmailId());
//mail.setEmpName(absentee.getEmployeeName());
//mail.setTo(absentee.getEmailId());
mail.setEmpName("Vijay");
mail.setTo("vakula@nisum.com");
functionalGroup = functionalGroupService.getFunctionalGroup(employee.getFunctionalGroup());
//mail.setCc(new String[]{functionalGroup.getGroupHeadEmailId()});
mail.setCc(new String[]{"mduppanapudi@nisum.com"});
mailService.sendLeaveNotification(mail);
}
}
} catch (MyTeamException e) {
e.printStackTrace();
}
}
}
package com.nisum.myteam.schedular;
import com.nisum.myteam.exception.handler.MyTeamException;
import com.nisum.myteam.model.Mail;
import com.nisum.myteam.model.dao.Employee;
import com.nisum.myteam.model.dao.Project;
import com.nisum.myteam.service.IEmployeeService;
import com.nisum.myteam.service.IMailService;
import com.nisum.myteam.service.IProjectService;
import com.nisum.myteam.utils.DateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
import javax.mail.MessagingException;
import java.io.IOException;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
import java.util.List;
@Component
public class ProjectEndDateScheduler {
private static final Logger logger = LoggerFactory.getLogger(LeaveNotificationScheduler.class);
private static final DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
@Autowired
private IMailService mailService;
@Autowired
private IProjectService projectService;
@Autowired
private IEmployeeService empService;
@Autowired
private Environment environment;
//@Scheduled(cron = "00 50 15 * * 1-5")
//@Scheduled(cron = "0 * * * * ?")
private void sendMailToDls() throws IOException, MessagingException {
logger.info("Project End date mail notification::");
Mail mail = new Mail();
mail.setFrom(environment.getProperty("email.project.notification.from"));
mail.setSubject(environment.getProperty("email.project.notification.subject"));
try {
List<Project> activeProjects = projectService.getActiveProjects();
logger.info("The active projects count::" + activeProjects.size());
if (activeProjects != null && activeProjects.size() > 0) {
LocalDate currentDate = LocalDate.now();
for (Project activeProject : activeProjects) {
LocalDate projectEndDate = DateUtils.convertUtilDateToLocalDate(activeProject.getProjectEndDate());
logger.info("Project End Date::" + projectEndDate);
long noOfDaysBetween = ChronoUnit.DAYS.between(currentDate, projectEndDate);
logger.info("Days Difference between EndDate of project and Current Date::" + noOfDaysBetween);
if (noOfDaysBetween == 7 || noOfDaysBetween == 1) {
List<String> dlIds = activeProject.getDeliveryLeadIds();
for (String dlId : dlIds) {
Employee employee = empService.getEmployeeById(dlId);
// mail.setEmpName(employee.getEmployeeName());
//mail.setTo(employee.getEmailId());
mail.setEmpName("Vijay");
mail.setTo("vakula@nisum.com");
logger.info("Mail Notification is sending to:" + employee.getEmployeeName() + "::" + employee.getEmailId());
mailService.sendProjectNotification(mail);
}
}
}
}
} catch (MyTeamException e) {
e.printStackTrace();
}
}
}
package com.nisum.myteam.service;
import com.nisum.myteam.model.FunctionalGroup;
import java.util.List;
public interface IFunctionalGroupService {
public List<FunctionalGroup> getAllFunctionalGroups();
public FunctionalGroup getFunctionalGroup(String functionalGroupName);
}
......@@ -4,6 +4,10 @@
package com.nisum.myteam.service;
import com.nisum.myteam.model.EmailDomain;
import com.nisum.myteam.model.Mail;
import javax.mail.MessagingException;
import java.io.IOException;
/**
* @author nisum
......@@ -14,4 +18,10 @@ public interface IMailService {
public String sendEmailWithAttachment(EmailDomain emailObj);
public String deletePdfReport(String fileName);
public void sendLeaveNotification(Mail mail)throws MessagingException, IOException;
public void sendProjectNotification(Mail mail)throws MessagingException, IOException;
}
......@@ -57,4 +57,5 @@ public interface IProjectService {
public List<HashMap<Object, Object>> getRoleBasedProjects(String empId) throws MyTeamException;
public List<HashMap<Object, Object>> getProjectsInsteadOfRole() throws MyTeamException;
public List<Project> getActiveProjects() throws MyTeamException;
}
......@@ -117,6 +117,7 @@ public class AttendanceService implements IAttendanceService {
attendData = new AttendenceData();
attendData.setEmployeeId(resultSet.getString("EmployeeCode"));
attendData.setEmployeeName(resultSet.getString("FirstName"));
attendData.setEmailId(resultSet.getString("EmailId"));
attendData.setPresent(type);
listOfEmployees.add(attendData);
attendData = null;
......
package com.nisum.myteam.service.impl;
import com.nisum.myteam.model.FunctionalGroup;
import com.nisum.myteam.repository.FunctionalGroupRepo;
import com.nisum.myteam.service.IFunctionalGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class FunctionalGroupService implements IFunctionalGroupService {
@Autowired
private FunctionalGroupRepo functionalGroupRepo;
public List<FunctionalGroup> getAllFunctionalGroups() {
return functionalGroupRepo.findAll();
}
@Override
public FunctionalGroup getFunctionalGroup(String functionalGroupName) {
return functionalGroupRepo.findByName(functionalGroupName);
}
}
......@@ -22,6 +22,14 @@ import org.springframework.stereotype.Service;
import com.nisum.myteam.model.EmailDomain;
import com.nisum.myteam.service.IMailService;
import com.nisum.myteam.model.Mail;
import org.springframework.util.ResourceUtils;
import org.thymeleaf.context.Context;
import org.thymeleaf.spring4.SpringTemplateEngine;
import java.nio.charset.StandardCharsets;
import org.springframework.core.io.ClassPathResource;
import java.nio.file.Files;
import org.springframework.core.env.Environment;
/**
* @author nisum
*
......@@ -37,6 +45,13 @@ public class MailService implements IMailService {
@Autowired
ResourceLoader resourceLoader;
@Autowired
private SpringTemplateEngine templateEngine;
@Autowired
private Environment environment;
@Override
public String sendEmailWithAttachment(EmailDomain emailObj) {
String response = "Success";
......@@ -93,4 +108,63 @@ public class MailService implements IMailService {
}
return response;
}
public void sendLeaveNotification(Mail mail) throws MessagingException, IOException
{
MimeMessage message = emailSender.createMimeMessage();
//MimeMessageHelper helper = new MimeMessageHelper(message,MimeMessageHelper.MULTIPART_MODE_MIXED_RELATED,StandardCharsets.UTF_8.name());
//Context context = new Context();
//context.setVariables(mail.getModel());
//String html = templateEngine.process(environment.getProperty("email.leave.notification.template.name") , context);
MimeMessageHelper helper = new MimeMessageHelper(message);
File file = ResourceUtils.getFile("classpath:"+environment.getProperty("email.leave.notification.template.file.path"));
//Read File Content
String content = new String(Files.readAllBytes(file.toPath()));
content=content.replaceAll("employeeName",mail.getEmpName());
//System.out.println(content);
helper.setTo(mail.getTo());
helper.setText(content, true);
helper.setSubject(mail.getSubject());
helper.setFrom(mail.getFrom());
helper.setCc(mail.getCc());
//helper.setBcc(mail.getBcc());
emailSender.send(message);
}
public void sendProjectNotification(Mail mail) throws MessagingException, IOException
{
MimeMessage message = emailSender.createMimeMessage();
//MimeMessageHelper helper = new MimeMessageHelper(message,MimeMessageHelper.MULTIPART_MODE_MIXED_RELATED,StandardCharsets.UTF_8.name());
//Context context = new Context();
//context.setVariables(mail.getModel());
//String html = templateEngine.process(environment.getProperty("email.leave.notification.template.name") , context);
MimeMessageHelper helper = new MimeMessageHelper(message);
File file = ResourceUtils.getFile("classpath:"+environment.getProperty("email.project.notification.template.file.path"));
//Read File Content
String content = new String(Files.readAllBytes(file.toPath()));
logger.info("In MailServiceIMPL::EmployeeName:::::"+mail.getEmpName());
content=content.replaceAll("employeeName",mail.getEmpName());
System.out.println(content);
helper.setTo(mail.getTo());
helper.setText(content, true);
helper.setSubject(mail.getSubject());
helper.setFrom(mail.getFrom());
helper.setCc(mail.getCc());
//helper.setBcc(mail.getBcc());
emailSender.send(message);
}
}
......@@ -755,4 +755,11 @@ public class ProjectService implements IProjectService {
}
public List<Project> getActiveProjects() throws MyTeamException {
List<Project> projects = projectRepo.findAll();
return projects.stream().filter(project -> project.getStatus().equalsIgnoreCase(MyTeamUtils.ACTIVE)).collect(Collectors.toList());
}
}
package com.nisum.myteam.statuscodes;
public enum EmployeeStatus {
ACTIVE("Active");
private String status;
private EmployeeStatus(String status) {
this.status = status;
}
public String getStatus() {
return this.status;
}
}
package com.nisum.myteam.utils;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.Date;
public class DateUtils {
public static LocalDate convertUtilDateToLocalDate(Date dateToConvert) {
return dateToConvert.toInstant()
.atZone(ZoneId.systemDefault())
.toLocalDate();
}
}
......@@ -91,9 +91,12 @@ public class MyTeamUtils {
public final static String UNION=" Union ";
public final static String PRESENT_QUERY = "SELECT DISTINCT Emp.EmployeeCode, Emp.FirstName FROM Transactions AS Tr, EmployeeMaster AS Emp WHERE Tr.EmployeemasterID = Emp.EmployeeMasterID AND CONVERT(VARCHAR,Tr.aDateTime, 111) = '<REPORTDATE>' AND Emp.EmployeeCode IN (<EMPIDS>)";
public final static String ABSENT_QUERY = "SELECT [EmployeeCode], [FirstName] FROM [EmployeeMaster] WHERE [EmployeeCode] IN(<ABSENTLIST>)";
//public final static String PRESENT_QUERY = "SELECT DISTINCT Emp.EmployeeCode, Emp.FirstName FROM Transactions AS Tr, EmployeeMaster AS Emp WHERE Tr.EmployeemasterID = Emp.EmployeeMasterID AND CONVERT(VARCHAR,Tr.aDateTime, 111) = '<REPORTDATE>' AND Emp.EmployeeCode IN (<EMPIDS>)";
//public final static String ABSENT_QUERY = "SELECT [EmployeeCode], [FirstName] FROM [EmployeeMaster] WHERE [EmployeeCode] IN(<ABSENTLIST>)";
public final static String PRESENT_QUERY = "SELECT DISTINCT Emp.EmployeeCode, Emp.FirstName, Emp.EmailId FROM Transactions AS Tr, EmployeeMaster AS Emp WHERE Tr.EmployeemasterID = Emp.EmployeeMasterID AND CONVERT(VARCHAR,Tr.aDateTime, 111) = '<REPORTDATE>' AND Emp.EmployeeCode IN (<EMPIDS>)";
public final static String ABSENT_QUERY = "SELECT [EmployeeCode], [FirstName],[EmailId] FROM [EmployeeMaster] WHERE [EmployeeCode] IN(<ABSENTLIST>)";
public final static String PRESENT = "P";
public final static String ABSENT = "A";
......@@ -151,4 +154,13 @@ public class MyTeamUtils {
public final static String CREATE ="CREATE";
public final static String UPDATE ="UPDATE";
public static final String SHIFT1="Shift 1(9:00 AM - 6:00 PM)";
public static final String SHIFT2="Shift-2(2:00 PM - 11:00 PM)";
public static final String SHIFT3="Shift 3(10:00 PM - 6:00 AM)";
public static final String SHIFT4="Shift 4(7:30 AM - 3:30 PM)";
public static final String SHIFT5="Shift 5(11:30 AM - 7:30 PM)";
}
package com.nisum.myteam.utils.constants;
public enum EmpSubStatus {
LONG_LEAVE("Long Leave"),
MATERNITY_LEAVE("Maternity Leave"),
ONSITE_TRAVEL("Onsite Travel"),
RESIGNED("Resigned");
private String leaveType;
private EmpSubStatus(String leaveType) {
this.leaveType = leaveType;
}
public String getLeaveType() {
return this.leaveType;
}
}
package com.nisum.myteam.utils.constants;
public enum ProjectStatus {
ACTIVE("Active"),
INACTIVE("InActive"),
COMPLETED("Completed"),
ONHOLD("On Hold");
private String projectStatus;
private ProjectStatus(String projectStatus) {
this.projectStatus = projectStatus;
}
public String getProjectStatus() {
return this.projectStatus;
}
}
package com.nisum.myteam.utils.constants;
public enum Shifts {
SHIFT1("Shift 1(9:00 AM - 6:00 PM)"),
SHIFT2("Shift-2(2:00 PM - 11:00 PM)"),
SHIFT3("Shift 3(10:00 PM - 6:00 AM)"),
SHIFT4("Shift 4(7:30 AM - 3:30 PM)"),
SHIFT5("Shift 5(11:30 AM - 7:30 PM)");
private String shiftType;
private Shifts(String shiftType) {
this.shiftType = shiftType;
}
public String getShiftType() {
return this.shiftType;
}
}
server.port=8080
server.context-path=/myTeam/
#Production configuration
#spring.data.mongodb.host=10.3.45.127
#spring.data.mongodb.port=27017
#spring.data.mongodb.database=myteamdb
#spring.data.mongodb.username=myteam
#spring.data.mongodb.password=myteam
#Local configuration
spring.data.mongodb.host=10.3.45.127
spring.data.mongodb.host=localhost
spring.data.mongodb.port=27017
spring.data.mongodb.database=myteamdb
spring.data.mongodb.username=myteam
spring.data.mongodb.password=myteam
spring.data.mongodb.database=mytime
quartz.enabled=true
cron.expression=0 45 10/3 1/1 * ? *
myTeamjob.frequency=10000
......@@ -35,4 +41,27 @@ spring.mvc.favicon.enabled = false
myTeam.data.mssqldb.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
myTeam.data.mssqldb.url=jdbc:sqlserver://10.3.45.218:1433;databaseName=smartiSCC
myTeam.data.mssqldb.username=sa
myTeam.data.mssqldb.password=admin@123
\ No newline at end of file
myTeam.data.mssqldb.password=admin@123
#email.leave.notification.template.name=thymeleaf/absentMailTemplate
#email.leave.notification.template.name=absentMailTemplate
email.leave.notification.template.file.path=email/absentMailTemplate.html
email.leave.notification.from=mytime.nisum@gmail.com
email.leave.notification.subject=Employee Leave Email Notification
#email.leave.notification.shift1.cron=00 14 * * 1-5
#email.leave.notification.shift2.cron=00 18 * * 1-5
#email.leave.notification.shift3.cron=00 02 * * 2-6
#email.leave.notification.shift4.cron=30 11 * * 1-5
#email.leave.notification.shift5.cron=30 15 * * 1-5
#spring.thymeleaf.suffix=/WEB-INF/thymeleaf/templates/
#spring.thymeleaf.prefix=.html
#spring.thymeleaf.view-names:thymeleaf/*
#spring.thymeleaf.view-names:thymeleaf/*
email.project.notification.template.file.path=email/projectMailTemplate.html
email.project.notification.from=mytime.nisum@gmail.com
email.project.notification.subject=Project EndDate Email Notification
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Email Notification</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body style="margin: 0; padding: 0;">
<table width="500px" cellpadding="10" cellspacing="0" style="border: 1px dotted #ccc; border-top: none; background: #f8f8f8; font-family: sans-serif; font-size: 14px; margin: 0 auto;">
<tr style="background: #00b4e6; color:#fff; font-size: 40px;">
<td>nisum</td>
</tr>
<tr>
<td align="center" style="border-bottom: 1px dotted #ccc; font-size: 20px;">Leave Reminder Notification</td>
</tr>
<tr>
<td style="background: url('https://cdn2.iconfinder.com/data/icons/office-38/24/office-55-512.png') no-repeat center center; background-size: 13%; height: 80px;"></td>
</tr>
<tr>
<td style="padding: 10px 10px 0 20px; width: 100px; ">Hi
<h3 style="color: #2abae2; display: inline-block; font-weight: bold; margin: 0; padding-left: 0px;">
employeeName
</h3>
</td>
</tr>
<tr>
<td style="line-height: 25px; padding: 15px 20px 20px 20px">As per the Biometric login records, we are unable to find your login time. We conclude that you are on leave for the day. <br /><br />Please apply the leave request for the same in <b>Ultipro.</b></td>
</tr>
<tr>
<td style="height: 25px">&nbsp;</td>
</tr>
<tr>
<td style="line-height: 25px; padding: 15px 20px 20px 20px"><b>NOTE:</b> <br />
--> Please ignore if already applied.<br />
</td>
</tr>
<tr>
<td style="color: #666; font-size: 12px; line-height: 20px; padding: 15px 20px 20px 20px">
Regards, <br />
Nisum Consulting
</td>
</tr>
</table>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Email Notification</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body style="margin: 0; padding: 0;">
<table width="500px" cellpadding="10" cellspacing="0" style="border: 1px dotted #ccc; border-top: none; background: #f8f8f8; font-family: sans-serif; font-size: 14px; margin: 0 auto;">
<tr style="background: #00b4e6; color:#fff; font-size: 40px;">
<td>nisum</td>
</tr>
<tr>
<td align="center" style="border-bottom: 1px dotted #ccc; font-size: 20px;">Project End Date Reminder Notification</td>
</tr>
<tr>
<td style="background: url('https://cdn2.iconfinder.com/data/icons/office-38/24/office-55-512.png') no-repeat center center; background-size: 13%; height: 80px;"></td>
</tr>
<tr>
<td style="padding: 10px 10px 0 20px; width: 100px; ">Hi,
<h3 style="color: #2abae2; display: inline-block; font-weight: bold; margin: 0; padding-left: 0px;">
employeeName
</h3>
</td>
</tr>
<tr>
<td style="line-height: 25px; padding: 15px 20px 20px 20px">As per the Biometric login records, we are unable to find your login time. We conclude that you are on leave for the day. <br /><br />Please apply the leave request for the same in <b>Ultipro.</b></td>
</tr>
<tr>
<td style="height: 25px">&nbsp;</td>
</tr>
<tr>
<td style="line-height: 25px; padding: 15px 20px 20px 20px"><b>NOTE:</b> <br />
Please ignore if already applied.<br />
</td>
</tr>
<tr>
<td style="color: #666; font-size: 12px; line-height: 20px; padding: 15px 20px 20px 20px">
Regards, <br />
Nisum Consulting
</td>
</tr>
</table>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment