if(user.getPerson() != null && user.getPerson().getEmail() != null) {
if(log.isDebugEnabled())
log.debug("generate status mail for: " + user.getUserName());
try {
StatusEmail mail = new StatusEmail();
mail.addRecipient(user);
List<JobVO> jobs = new JobDAO().getByUser(user, startDate.getTime(), endDate.getTime());
List<EventVO> events = new EventDAO().getByTimePeriod(user.getCalendar(), startDate.getTime(), endDate.getTime(), user);
if(!jobs.isEmpty() || !events.isEmpty()) {
if(log.isDebugEnabled())
log.debug(jobs.size() + "jobs found");
for(JobVO job : jobs)
mail.addJobs(job);
if(log.isDebugEnabled())
log.debug(events.size() + "events found");
for(EventVO event : events)
mail.addEvents(event);
if(log.isDebugEnabled())
log.debug("sending status mail for: " + user.getUserName());
new MailService().send(mail);
} else {