function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Siva SakthiSiva Sakthi 

Sending Mass Email

Hi all,


Can anyone tell me how to collect the Email Ids from (custom Object  Employee  ) the list view displaying Employee Email Id List .



I Want send  a mail for that selected List of Mail  , when i click the send mass email button. it has to collect id of the selected Employee Object and mail to the record.


Can anyone give me a solution for this?

To create List of email try below,


List<Employee__c> lstEmployee = [Select id, Email__c From Employee__c];


Set<String> setEmail = new Set<String>();



   for(Employee__c emp:lstEmployee){





here your email list is ready. now use below link for code to send emails.


I hope this will helpfull to you.

Siva SakthiSiva Sakthi

Thanks for   Mass E-mail code.

I have field as subject(s1,s2,s3).. I displayed the one subject (s1)based on query...Now i want to display S1,S2,S3 in same query..using Where clause..It s possible? send any Sample Codes



  Select  subid from subject where s1