0

We have a list of items, each item represent to a person and his leave details.

The thing is that, we need to trigger a mail at some point of the day with the list of all employees, who is on leave today.

I am aware of how mail sending is working, but not sure how getting all the employees data from the list who is on leave today.

Can someone help me in it?

  • using SharePoint Designer/Infopath tools. – ZedProg Aug 13 '15 at 12:42
0

I would suggest you a timer job.
To get all the user you can filter them by a field. (maybe if you have the leaving date).

Send email is really easy using SPUtility.sendEmail.
I am giving you a bunch of useful links.

Create and Deploy Custom Timer Job Definition in SharePoint Programatically
SPUtility.SendEmail Method
How To Send Email with SPUtility

  • can we don it using SharePoint designer? – ZedProg Aug 13 '15 at 12:40
  • yes, you can use SP workflow and send email from there. Look these links: definitivelogic.com/blog/timer-job-workaround support.office.com/en-ca/article/… – Nk SP Aug 13 '15 at 12:46
  • thanks for link. i am able to get the 1st person who is leave today in the email , but don't know how to get the rest of the persons, who is on leave today. That's the part which is really missing for me. – ZedProg Aug 13 '15 at 12:50
  • but how can you he is leaving? Do you have a field or what else? – Nk SP Aug 13 '15 at 12:52
  • We are manually updating the list with the persons details, who all are on leave today. If there are 5 employees leave today, we manually add those data in to the custom list. The thing we require is that this persons details should be added in the SharePoint workflow email to trigger at around 6pm everyday. I am able to get the first person who is on leave today, and populate it on the email, but not the rest. That part is actually missing. – ZedProg Aug 13 '15 at 12:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.