How to send emails to selected items in a list?

Hi experts,

I've added a workspace to my Sharepoint web site. This workspace contains two lists. The first is named "Persons". The second is named "Sessions".
The Sessions list contains information about courses (Start time, end time, module, etc.)

So, my objective is to add a functionality to Persons list that allows me to send emails (which contain information about sessions) to all persons or just a selected group of persons.

I think about adding a checkbox field to Persons list and a "Send" button in the page. When clicking on "Send" button, I check for the items that have checkbox selected, then send email. Can this idea resolve the problem? Is there a better and easier solution?

Thank you,
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Shailaja KumarCommented:
The approach looks good to me, except that you are clear about the business workflow as to when you want to send a email, ideally the approach would be to add a column in the sessions list stating people for whom it is being targeted (this column can be a lookup column based on the persons list). Then send the email to the corresponding group or user.
pgirardierAuthor Commented:
Shailaja kumar, thank you for your reply and your suggested approach.

Well, if I add a column to Sessions list allows me to select perons, will it be a good idea to add the "send" button in the DispForm page of Sessions? Else, any suggestion is welcome.

Then, How can I code the sending process? Can I use JavaScript/JQuery?

Let me ask you a few questions first:
1. Will the email contains all the sessions applied to the individual recipient or do you just want to send to a group of people (eithr all or selected) about one session info?
2. At what time point you want the emails to go out? This is probably related to the answer to the first question.
I think I need to understand more about your requirements.
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

pgirardierAuthor Commented:
Hi Thman, of course, you can ask any question. And here is the answers to the above questions:

1. I want to send to a group of people (eithr all or selected) emails about one or more session(s) info (like mailing list).

2. Sending email is launched by clicking on a "send" button and not related to a specific time.

So, in summary, I want to send emails to a group of people (eithr all or selected) about particular sessions (selected ones) by clicking on a "send" button.

I hope that these details help.
It sound like the best solution is that you create a customized web part that you can insert to a page. The web part will allow you select the sessions and people you want to send to, then click a button to send out the email. This requires programming in Visual Studio. This is the best solution (compared with the alternative ones below) to fulfill what you want.
Alternative approaches:
1. Every time only sends out an email about one session to a group of people. This is done in the Sessions list. You can have a checkbox to indicate whether it is for all the people, otherwise you can select people from the Persons list. There is another check box to indicate the session is ready to be sent. Once saved, your event handler (programmed using Visual Studio) will send out the emails if it is indicated as ready to send. It is possible that you can use Javascript, however, it is more complicated than using the event handler as you will have to figurre out how to get the email addresses of the Persons you selected.
2. Program an admin job that runs daily to check if there are sessions ready to be sent. In the job, you can either send all sessions info to an individual person or one session at a time to selected group of people. I'd prefer the former if this solution is picked as it sends less emails to one user.
Let me know if you have any questions.
pgirardierAuthor Commented:
Well, the best idea is to develop a custom web part that allows selecting the destination emails, then customizing the body of the message and send it.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Yes, you are right. My 2 other approaches were just alternative ways to do it.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SharePoint

From novice to tech pro — start learning today.