Link to home
Start Free TrialLog in
Avatar of pgirardier
pgirardier

asked on

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,
Avatar of Shailaja Kumar
Shailaja Kumar
Flag of Singapore image

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.
Avatar of pgirardier
pgirardier

ASKER

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?

Thanks,
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.
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.
Thanks
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.
 
ASKER CERTIFIED SOLUTION
Avatar of pgirardier
pgirardier

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes, you are right. My 2 other approaches were just alternative ways to do it.